* fix memleaks
authorWilfried Göesgens <willi@citadel.org>
Wed, 25 Feb 2009 23:12:11 +0000 (23:12 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 25 Feb 2009 23:12:11 +0000 (23:12 +0000)
libcitadel/lib/json.c
libcitadel/lib/wildfire.c

index 8690f4e2b7b3d851fbc86e281b766d914de19339..9c941bc626436755706e0fce9749d76b3152f8e2 100644 (file)
@@ -219,6 +219,7 @@ void SerializeJson(StrBuf *Target, JsonValue *Val, int FreeVal)
                        vPrevious = vValue;
                }
                StrBufAppendBufPlain(Target, HKEY("]"), 0);
+               DeleteHashPos(&It);
                break;
        case JSON_OBJECT:
                vPrevious = NULL;
@@ -241,6 +242,7 @@ void SerializeJson(StrBuf *Target, JsonValue *Val, int FreeVal)
                        vPrevious = vValue;
                }
                StrBufAppendBufPlain(Target, HKEY("}"), 0);
+               DeleteHashPos(&It);
                break;
        }
        if(FreeVal) {
index 6d6669034c3d5c9e8617dd710b59c9bd4e9bc480..744634a8b50a62f1f407f5da161788c9fbadc633 100644 (file)
@@ -437,6 +437,9 @@ void WildFireSerializePayload(StrBuf *JsonBuffer, StrBuf *OutBuf, int *MsgCount,
        if (OutBuf == NULL) {
                FreeStrBuf(&Header);
        }
+       FreeStrBuf(&N);
+       FreeStrBuf(&Buf);
+       FreeStrBuf(&HeaderName);
 }