diff options
author | George Kadianakis <desnacked@riseup.net> | 2021-02-09 18:50:20 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2021-02-09 19:15:49 +0200 |
commit | b64fe4bf55e57c19bb0ade5fc08d6500ac561019 (patch) | |
tree | 9382a0c1c99aba69fcb99fdb151a90b3e131203f /src/core/or/connection_edge.c | |
parent | 14e1c2fe0a5b94cfc2db9be0185a3b09fd119e3c (diff) | |
download | tor-b64fe4bf55e57c19bb0ade5fc08d6500ac561019.tar.gz tor-b64fe4bf55e57c19bb0ade5fc08d6500ac561019.zip |
Fix coverity warnings 1472846 / 1472845.
Diffstat (limited to 'src/core/or/connection_edge.c')
-rw-r--r-- | src/core/or/connection_edge.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c index b212160f60..aa48d16b7c 100644 --- a/src/core/or/connection_edge.c +++ b/src/core/or/connection_edge.c @@ -3521,10 +3521,12 @@ tell_controller_about_resolved_result(entry_connection_t *conn, { uint64_t stream_id = 0; - if (conn) { - stream_id = ENTRY_TO_CONN(conn)->global_identifier; + if (BUG(!conn)) { + return; } + stream_id = ENTRY_TO_CONN(conn)->global_identifier; + expires = time(NULL) + ttl; if (answer_type == RESOLVED_TYPE_IPV4 && answer_len >= 4) { char *cp = tor_dup_ip(ntohl(get_uint32(answer))); |