diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-01-06 14:20:26 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-01-06 14:20:26 +1030 |
commit | d4929b8d2c8fc18ab16d2ef2bf7af11e87dac36d (patch) | |
tree | 6e68cbcc96b88e2991220bcd9113e04ecaad3d72 | |
parent | 0f76c8b33771d01df2ce92974b88a69840bed321 (diff) |
str: clean up tests so ccanlint doesn't complain about memory leaking.
-rw-r--r-- | ccan/str/test/run.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ccan/str/test/run.c b/ccan/str/test/run.c index a9dacab0..4648692b 100644 --- a/ccan/str/test/run.c +++ b/ccan/str/test/run.c @@ -73,9 +73,14 @@ int main(int argc, char *argv[]) ok1(!strstarts(strings[i], strings[j])); ok1(!strends(reva, revb)); } + free(reva); + free(revb); } } + for (i = 0; i < n; i++) + free(strings[i]); + ok1(streq(stringify(NUM_SUBSTRINGS), "((sizeof(substrings) / sizeof(substrings[0])) - 1)")); ok1(streq(stringify(ARRAY_SIZE(substrings)), |