Fix memory leak in unittest helper function.

This commit is contained in:
Nick Mathewson
2014-04-26 00:13:49 -04:00
parent 9fbb5a44b8
commit 1117889f4a
+2
View File
@@ -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;