Merge pull request #330 from dragos-oancea/sofia-sdp_val-never-read--
[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:
commit
4581d7bf13
|
@ -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…
Reference in New Issue