diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-26 00:13:49 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-04-26 00:13:49 -0400 |
commit | 1117889f4a1ef7e61c2663258c94f505407d63ee (patch) | |
tree | 7c4b8ef00521e202ed37c7195eee1c3f8d18daef /src/test | |
parent | 9fbb5a44b801397be69f5be2c2baff05e93af0f6 (diff) | |
download | tor-1117889f4a1ef7e61c2663258c94f505407d63ee.tar.gz tor-1117889f4a1ef7e61c2663258c94f505407d63ee.zip |
Fix memory leak in unittest helper function.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 256d849919..f2a0eafb3c 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -3146,6 +3146,8 @@ smartlist_new_from_text_lines(const char *lines) last_line = smartlist_pop_last(sl); if (last_line != NULL && *last_line != '\0') { smartlist_add(sl, last_line); + } else { + tor_free(last_line); } return sl; |