mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Resolve a resource leak in test_util_split_lines
Fixes coverity CID # 488
This commit is contained in:
parent
c5e2bfa983
commit
e83862a0ff
@ -1660,7 +1660,7 @@ test_util_split_lines(void *ptr)
|
|||||||
|
|
||||||
int i, j;
|
int i, j;
|
||||||
char *orig_line;
|
char *orig_line;
|
||||||
smartlist_t *sl;
|
smartlist_t *sl=NULL;
|
||||||
|
|
||||||
(void)ptr;
|
(void)ptr;
|
||||||
|
|
||||||
@ -1689,10 +1689,12 @@ test_util_split_lines(void *ptr)
|
|||||||
tt_assert(tests[i].split_line[j] == NULL);
|
tt_assert(tests[i].split_line[j] == NULL);
|
||||||
tor_free(orig_line);
|
tor_free(orig_line);
|
||||||
smartlist_free(sl);
|
smartlist_free(sl);
|
||||||
|
sl = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
;
|
tor_free(orig_line);
|
||||||
|
smartlist_free(sl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user