epan: Remove an unneeded null check.

Fix

```
*** CID 1505356:  Null pointer dereferences  (REVERSE_INULL)
/builds/wireshark/wireshark/epan/conversation.c: 1427 in find_conversation()
1421              * conversation with the specified address B and port B as the
1422              * first address and port, and with any second address and port
1423              * (this packet may be going in the opposite direction from the
1424              * first packet in the conversation).
1425              * (Neither "addr_a" nor "port_a" take part in this lookup.)
1426              */
>>>     CID 1505356:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "addr_a" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1427             if ((addr_a != NULL) && (addr_a->type == AT_FC)) {
1428                 DPRINT(("trying wildcarded match: %s:%d -> *:*",
1429                             addr_b_str, port_a));
1430                 conversation = conversation_lookup_no_addr2_or_port2(frame_num, addr_b, port_a, etype);
1431             } else {
1432                 DPRINT(("trying wildcarded match: %s:%d -> *:*",
```
This commit is contained in:
Gerald Combs 2022-06-07 16:08:32 -07:00
parent c5e265f852
commit c9396bba11
1 changed files with 1 additions and 1 deletions

View File

@ -1424,7 +1424,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address
* first packet in the conversation).
* (Neither "addr_a" nor "port_a" take part in this lookup.)
*/
if ((addr_a != NULL) && (addr_a->type == AT_FC)) {
if (addr_a->type == AT_FC) {
DPRINT(("trying wildcarded match: %s:%d -> *:*",
addr_b_str, port_a));
conversation = conversation_lookup_no_addr2_or_port2(frame_num, addr_b, port_a, etype);