From: Jakub Karolczyk Date: Thu, 6 Apr 2023 11:42:23 +0000 (+0100) Subject: [mod_xml_scgi] Coverity CID 1468595 (Resource leak) X-Git-Tag: v1.10.10^2~72^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=80d5790274ec85ba39c34fc9831867695c348986;p=thirdparty%2Ffreeswitch.git [mod_xml_scgi] Coverity CID 1468595 (Resource leak) --- diff --git a/src/mod/xml_int/mod_xml_scgi/mod_xml_scgi.c b/src/mod/xml_int/mod_xml_scgi/mod_xml_scgi.c index 63306c76a3..24c0270a57 100644 --- a/src/mod/xml_int/mod_xml_scgi/mod_xml_scgi.c +++ b/src/mod/xml_int/mod_xml_scgi/mod_xml_scgi.c @@ -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; }