mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
test_channel_listener: free 'chan' explicitly
This should fix CID 1437442, where coverity can't tell that channel_free_all() frees the fake channel we allocated.
This commit is contained in:
parent
0a9685b3a7
commit
d5db40a014
@ -1540,6 +1540,10 @@ test_channel_listener(void *arg)
|
||||
channel_listener_dump_statistics(chan, LOG_INFO);
|
||||
|
||||
done:
|
||||
if (chan) {
|
||||
channel_listener_unregister(chan);
|
||||
tor_free(chan);
|
||||
}
|
||||
channel_free_all();
|
||||
}
|
||||
|
||||
@ -1566,4 +1570,3 @@ struct testcase_t channel_tests[] = {
|
||||
NULL, NULL },
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user