mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-12 10:07:26 +00:00
Let's bit a bit safer when dereferencing pointers.
This commit is contained in:
parent
6c3062a768
commit
dfbc175776
@ -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