mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix a NULL dereference on unit test failure. CID 1353177.
This commit is contained in:
parent
5cd6c577df
commit
31c96a3699
@ -434,8 +434,10 @@ test_routerlist_router_is_already_dir_fetching(void *arg)
|
||||
|
||||
done:
|
||||
/* If a connection is never set up, connection_free chokes on it. */
|
||||
buf_free(mocked_connection->inbuf);
|
||||
buf_free(mocked_connection->outbuf);
|
||||
if (mocked_connection) {
|
||||
buf_free(mocked_connection->inbuf);
|
||||
buf_free(mocked_connection->outbuf);
|
||||
}
|
||||
tor_free(mocked_connection);
|
||||
UNMOCK(connection_get_by_type_addr_port_purpose);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user