mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-03 09:21:29 +00:00
[Core] scan-build: Fix false-positive bad free by switch_must_realloc() in switch_xml_proc_inst()
This commit is contained in:
parent
716a21b0b5
commit
f3c7c4d445
@ -795,7 +795,7 @@ static void switch_xml_proc_inst(switch_xml_root_t root, char *s, switch_size_t
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!root->pi || !root->pi[0]) {
|
if (root->pi == (char ***)(SWITCH_XML_NIL) || !root->pi || !root->pi[0]) {
|
||||||
root->pi = (char ***) switch_must_malloc(sizeof(char **));
|
root->pi = (char ***) switch_must_malloc(sizeof(char **));
|
||||||
*(root->pi) = NULL; /* first pi */
|
*(root->pi) = NULL; /* first pi */
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user