diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-11-30 12:16:08 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-11-30 12:16:08 -0500 |
commit | e83862a0ff7be42f5cbcb35c20b0405ca5bb27fd (patch) | |
tree | a2c10067cbef7c9f2c54783b1e21385d178ffac8 /src/test | |
parent | c5e2bfa98341b6e91ee7543232ece9a86c77d2c0 (diff) | |
download | tor-e83862a0ff7be42f5cbcb35c20b0405ca5bb27fd.tar.gz tor-e83862a0ff7be42f5cbcb35c20b0405ca5bb27fd.zip |
Resolve a resource leak in test_util_split_lines
Fixes coverity CID # 488
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 93f11cd208..c762a8d7b3 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -1660,7 +1660,7 @@ test_util_split_lines(void *ptr) int i, j; char *orig_line; - smartlist_t *sl; + smartlist_t *sl=NULL; (void)ptr; @@ -1689,10 +1689,12 @@ test_util_split_lines(void *ptr) tt_assert(tests[i].split_line[j] == NULL); tor_free(orig_line); smartlist_free(sl); + sl = NULL; } done: - ; + tor_free(orig_line); + smartlist_free(sl); } static void |