mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-07 21:44:51 +00:00
Let's bit a bit safer when dereferencing pointers.
This commit is contained in:
parent
480407e5f3
commit
12f2f674f9
@ -851,9 +851,11 @@ amf0_data * amf0_object_get(amf0_data * data, const char * name) {
|
|||||||
return (node != NULL) ? node->data : NULL;
|
return (node != NULL) ? node->data : NULL;
|
||||||
}
|
}
|
||||||
/* we have to skip the element data to reach the next name */
|
/* we have to skip the element data to reach the next name */
|
||||||
|
if ( node != NULL && node->next != NULL ) {
|
||||||
node = node->next->next;
|
node = node->next->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -870,9 +872,11 @@ amf0_data * amf0_object_set(amf0_data * data, const char * name, amf0_data * ele
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* we have to skip the element data to reach the next name */
|
/* we have to skip the element data to reach the next name */
|
||||||
|
if ( node != NULL && node->next != NULL ) {
|
||||||
node = node->next->next;
|
node = node->next->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user