diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-12-18 10:27:30 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-12-18 10:27:30 -0500 |
commit | 428e2b7636ed2430dd41d3a802290e971d2a081a (patch) | |
tree | dfcd4a216602b6064fb4127848be85444df14f8f /src/test/test_dns.c | |
parent | 6b5b1a02d46f761b691527c8e3c9a2ad08b0c3a5 (diff) | |
download | tor-428e2b7636ed2430dd41d3a802290e971d2a081a.tar.gz tor-428e2b7636ed2430dd41d3a802290e971d2a081a.zip |
Fix a coverity NULL-pointer deref warning in the DNS tests.
This is CID 1340251
Diffstat (limited to 'src/test/test_dns.c')
-rw-r--r-- | src/test/test_dns.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_dns.c b/src/test/test_dns.c index b781d6da53..6fdbe905e0 100644 --- a/src/test/test_dns.c +++ b/src/test/test_dns.c @@ -738,7 +738,8 @@ NS(test_main)(void *arg) NS_UNMOCK(launch_resolve); tor_free(on_circ); tor_free(TO_CONN(exitconn)->address); - tor_free(cache_entry->pending_connections); + if (cache_entry) + tor_free(cache_entry->pending_connections); tor_free(cache_entry); tor_free(exitconn); return; |