mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix memory leak in unittest helper function.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user