]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[sofia-sip] scan-build: Access to field 'c_nettype' results in a dereference of a... 330/head
authorDragos Oancea <dragos@signalwire.com>
Wed, 12 Feb 2020 01:21:30 +0000 (01:21 +0000)
committerDragos Oancea <dragos@signalwire.com>
Wed, 12 Feb 2020 01:24:58 +0000 (01:24 +0000)
libs/sofia-sip/libsofia-sip-ua/sdp/sdp.c

index 93c0c230eeb67c98be632985f269350deebe44f3..b417a2e704bb6c8d4f0372106b84a33c4a9ef722 100644 (file)
@@ -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)