mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Fix a leak-on-failure on test_get_bandwidth_lines()
Spotted by coverity. This is CID 1465571.
This commit is contained in:
parent
700e8a8bb0
commit
efe8a98817
@ -452,7 +452,7 @@ static void
|
||||
test_get_bandwidth_lines(void *arg)
|
||||
{
|
||||
(void) arg;
|
||||
char *str, *checkstr;
|
||||
char *str = NULL, *checkstr = NULL;
|
||||
char t[ISO_TIME_LEN+1];
|
||||
int len = (67+MAX_HIST_VALUE_LEN)*4;
|
||||
checkstr = tor_malloc_zero(len);
|
||||
@ -486,7 +486,9 @@ test_get_bandwidth_lines(void *arg)
|
||||
"2048,29696,14336,59392,29696\n",
|
||||
t, t, t, t);
|
||||
test_get_bw_lines(str, checkstr);
|
||||
|
||||
done:
|
||||
tor_free(str);
|
||||
tor_free(checkstr);
|
||||
bwhist_free_all();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user