]> git.ozlabs.org Git - ccan/blobdiff - ccan/stringmap/test/run.c
opt: fix memory leak in tests.
[ccan] / ccan / stringmap / test / run.c
index 52309c2601d863deef142151c6781f116a77bec2..2ffcb1242493b79ffabb2008729b17fa7dbc3b7f 100644 (file)
@@ -1,7 +1,7 @@
-#include "stringmap/stringmap.h"
-#include "stringmap/stringmap.c"
+#include <ccan/stringmap/stringmap.h>
+#include <ccan/stringmap/stringmap.c>
 
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
 
 static void test_trivial(void) {
        stringmap(int) map = stringmap_new(NULL);
@@ -243,7 +243,7 @@ static int test_stringmap(size_t count, FILE *out) {
        struct test_entry *entries = block_pool_alloc(bp, sizeof(*entries) * count);
        struct test_entry *i, *e = entries+count, *o;
        char *value_base = block_pool_alloc(bp, count), *value = value_base;
-       size_t unique_count;
+       size_t unique_count = 0;
        
        //we use value to track whether an entry has been added or not
        memset(value, 0, count);