mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
[sofia-sip] scan-build: Access to field 'c_nettype' results in a dereference of a null pointer (loaded from variable 'a')
This commit is contained in:
parent
1b66e76548
commit
602eaeb169
@ -1244,6 +1244,8 @@ int sdp_connection_cmp(sdp_connection_t const *a, sdp_connection_t const *b)
|
||||
if ((a != NULL) != (b != NULL))
|
||||
return (a != NULL) < (b != NULL) ? -1 : 1;
|
||||
|
||||
if (!a || !b)
|
||||
return -1;
|
||||
if (a->c_nettype != b->c_nettype)
|
||||
return a->c_nettype < b->c_nettype ? -1 : 1;
|
||||
if (a->c_addrtype != b->c_addrtype)
|
||||
|
Loading…
x
Reference in New Issue
Block a user