[Core] scan-build: Fix false-positive bad free by switch_must_realloc() in switch_xml_proc_inst()

This commit is contained in:
Andrey Volk 2022-01-05 02:15:42 +03:00
parent 716a21b0b5
commit f3c7c4d445
1 changed files with 1 additions and 1 deletions

View File

@ -795,7 +795,7 @@ static void switch_xml_proc_inst(switch_xml_root_t root, char *s, switch_size_t
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) = NULL; /* first pi */
}