don't leak on xferext ivr event, CID:1214232 Resource leak

This commit is contained in:
Michael Jerris 2014-05-16 14:50:18 +00:00
parent 65d9cf62c9
commit 269db09015
1 changed files with 9 additions and 6 deletions

View File

@ -696,6 +696,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
if (!strcasecmp(hp->name, "application")) { if (!strcasecmp(hp->name, "application")) {
app = strdup(hp->value); app = strdup(hp->value);
if (app) {
data = strchr(app, ' '); data = strchr(app, ' ');
if (data) { if (data) {
@ -703,6 +704,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
} }
switch_caller_extension_add_application(session, extension, app, data); switch_caller_extension_add_application(session, extension, app, data);
free(app);
}
} }
} }