Skip to content
Snippets Groups Projects
Commit c4d0d30b authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Fix some 'dereference-before-null-check' warnings in test_circuitlist.c

Found by Coverity Scan.

[CID 1234704, 1234705, 1234706]
parent 0e66edb2
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,10 @@ test_clist_maps(void *arg)
memset(&cam, 0, sizeof(cam));
memset(&cdm, 0, sizeof(cdm));
tt_assert(ch1);
tt_assert(ch2);
tt_assert(ch3);
ch1->cmux = tor_malloc(1);
ch2->cmux = tor_malloc(1);
ch3->cmux = tor_malloc(1);
......@@ -161,7 +165,7 @@ test_clist_maps(void *arg)
if (ch2)
tor_free(ch2->cmux);
if (ch3)
tor_free(ch3->cmux);
tor_free(ch3->cmux);
tor_free(ch1);
tor_free(ch2);
tor_free(ch3);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment