Bugfix: several errors in our test program
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 12 Dec 2010 14:03:43 +0000 (15:03 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 12 Dec 2010 14:10:27 +0000 (15:10 +0100)
 - initialize the count before passing it into wildfirea
 - free all our buffers properly.

libcitadel/tests/wildfire_test.c

index e77c263b03d9c561b2ce6e2f432967b506ddf85d..afbcac12a4260e6450d004863da7f36598adcdb7 100644 (file)
@@ -69,8 +69,9 @@ static void CreateWildfireSampleMessage(StrBuf *OutBuf)
        WildFireSerializePayload(Json, Header, &n, NULL);
        StrBufAppendBuf(OutBuf, Header, 0);
 
-       FlushStrBuf(Json);
-       FlushStrBuf(Header);
+       FreeStrBuf(&Buf);
+       FreeStrBuf(&Json);
+       FreeStrBuf(&Header);
 
 }
 
@@ -79,7 +80,7 @@ int main(int argc, char* argv[])
        StrBuf *WFBuf;
        StrBuf *OutBuf;
        StrBuf *Info;
-       int nWildfireHeaders;
+       int nWildfireHeaders = 0;
 
        StartLibCitadel(8);
        printf("%s == %d?\n", libcitadel_version_string(), libcitadel_version_number());