[sofia-sip] scan-build: Access to field 'z_number_of_adjustments' results in a dereference of a null pointer (loaded from variable 'a')
This commit is contained in:
parent
1b66e76548
commit
d8cddaf4e9
|
@ -1334,6 +1334,8 @@ int sdp_zone_cmp(sdp_zone_t const *a, sdp_zone_t const *b)
|
||||||
if ((a != NULL) != (b != NULL))
|
if ((a != NULL) != (b != NULL))
|
||||||
return (a != NULL) < (b != NULL) ? -1 : 1;
|
return (a != NULL) < (b != NULL) ? -1 : 1;
|
||||||
|
|
||||||
|
if (!a || !b)
|
||||||
|
return -1;
|
||||||
n = a->z_number_of_adjustments < b->z_number_of_adjustments
|
n = a->z_number_of_adjustments < b->z_number_of_adjustments
|
||||||
? a->z_number_of_adjustments : b->z_number_of_adjustments;
|
? a->z_number_of_adjustments : b->z_number_of_adjustments;
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
|
|
Loading…
Reference in New Issue