[mod_xml_scgi] Coverity CID 1468595 (Resource leak)

This commit is contained in:
Jakub Karolczyk 2023-04-06 12:42:23 +01:00
parent 73ea37c5ab
commit 80d5790274
1 changed files with 4 additions and 0 deletions

View File

@ -176,6 +176,10 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
if (bytes > XML_SCGI_MAX_BYTES) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Data too big!\n");
len = -1;
if (expanded != (char*)buf) {
free(expanded);
}
break;
}