From: Jason Ish Date: Mon, 16 Jan 2017 16:34:19 +0000 (-0600) Subject: dns (tcp) - fix coverity CIDs 1374306, 1374305 X-Git-Tag: suricata-3.2.1~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a10a9220cf8f9072b6c3ad771525a333ab990f8c;p=thirdparty%2Fsuricata.git dns (tcp) - fix coverity CIDs 1374306, 1374305 CID 1374306 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking dns_state suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 585 if (dns_state != NULL && f != NULL) { 586 dns_state->last_req = f->lastts; 587 } CID 1374305 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking dns_state suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 366 if (dns_state != NULL && f != NULL) { 367 dns_state->last_req = f->lastts; 368 } --- diff --git a/src/app-layer-dns-tcp.c b/src/app-layer-dns-tcp.c index b27d8d87e9..4296a49c15 100644 --- a/src/app-layer-dns-tcp.c +++ b/src/app-layer-dns-tcp.c @@ -363,7 +363,7 @@ next_record: goto bad_data; } - if (dns_state != NULL && f != NULL) { + if (f != NULL) { dns_state->last_req = f->lastts; } @@ -582,7 +582,7 @@ next_record: goto bad_data; } - if (dns_state != NULL && f != NULL) { + if (f != NULL) { dns_state->last_req = f->lastts; }