mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
Let's bit a bit safer when dereferencing pointers.
This commit is contained in:
parent
6c3062a768
commit
dfbc175776
@ -851,7 +851,9 @@ 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 */
|
||||||
node = node->next->next;
|
if ( node != NULL && node->next != NULL ) {
|
||||||
|
node = node->next->next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -870,7 +872,9 @@ 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 */
|
||||||
node = node->next->next;
|
if ( node != NULL && node->next != NULL ) {
|
||||||
|
node = node->next->next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user