diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-10-26 22:18:05 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-10-26 22:40:41 -0400 |
commit | 134ac8059b18551e37f5b298f5a6362f07fa3ea7 (patch) | |
tree | 00df49fd67921284045105111f5c03b7abf2ff78 /src/test | |
parent | caa141617f324138b329051520dcdf0d9289d618 (diff) | |
download | tor-134ac8059b18551e37f5b298f5a6362f07fa3ea7.tar.gz tor-134ac8059b18551e37f5b298f5a6362f07fa3ea7.zip |
Fix the very noisy unit test memory leak of CID 420-421.
On any failing case in test_util_config_line, we would leak a couple
of strings.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 64f733581b..51b788e725 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -88,7 +88,7 @@ static void test_util_config_line(void) { char buf[1024]; - char *k, *v; + char *k=NULL, *v=NULL; const char *str; /* Test parse_config_line_from_str */ @@ -161,7 +161,8 @@ test_util_config_line(void) tor_free(k); tor_free(v); test_streq(str, ""); done: - ; + tor_free(k); + tor_free(v); } /** Test basic string functionality. */ |