[mod_hiredis] Xml object is not freed on load.

This commit is contained in:
Andrey Volk 2019-10-07 20:54:52 +04:00
parent 05dbd8bd05
commit 5fd6299267
1 changed files with 4 additions and 0 deletions

View File

@ -115,10 +115,14 @@ switch_status_t mod_hiredis_do_config()
goto err;
}
switch_xml_free(xml);
return SWITCH_STATUS_SUCCESS;
err:
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Configuration failed\n");
if (xml) {
switch_xml_free(xml);
}
return SWITCH_STATUS_GENERR;
}