commit 1117889f4a1ef7e61c2663258c94f505407d63ee Author: Nick Mathewson nickm@torproject.org Date: Sat Apr 26 00:13:49 2014 -0400
Fix memory leak in unittest helper function. --- src/test/test_util.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/test/test_util.c b/src/test/test_util.c index 256d849..f2a0eaf 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;
tor-commits@lists.torproject.org