mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
Fix an unreached null-pointer deref in connection tests
This is CID 1343603
This commit is contained in:
parent
9b1c491ec6
commit
4ede2decad
1 changed files with 3 additions and 4 deletions
|
@ -182,14 +182,13 @@ test_conn_get_basic_teardown(const struct testcase_t *tc, void *arg)
|
|||
conn->linked_conn->write_event = NULL;
|
||||
}
|
||||
|
||||
connection_free(conn->linked_conn);
|
||||
conn->linked_conn = NULL;
|
||||
|
||||
conn->linked_conn->linked_conn = NULL;
|
||||
if (!conn->linked_conn->marked_for_close) {
|
||||
connection_close_immediate(conn->linked_conn);
|
||||
connection_mark_for_close(conn->linked_conn);
|
||||
}
|
||||
conn->linked_conn->linked_conn = NULL;
|
||||
connection_free(conn->linked_conn);
|
||||
conn->linked_conn = NULL;
|
||||
}
|
||||
|
||||
/* We didn't set the events up properly, so we can't use event_del() in
|
||||
|
|
Loading…
Add table
Reference in a new issue