From 22942e94cdaee493b0b76d8ca1a599d842b7c283 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 10 May 2014 00:35:32 +0500 Subject: [PATCH] FS-6515 --resolve --- src/switch_ivr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 987796941b..7d6b7c3085 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -1319,6 +1319,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess if (strchr(terminators, buf[i]) && terminator != NULL) { *terminator = buf[i]; buf[i] = '\0'; + switch_safe_free(abuf); return SWITCH_STATUS_SUCCESS; } } @@ -1382,6 +1383,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess if (!zstr(terminators) && strchr(terminators, dtmf.digit) && terminator != NULL) { *terminator = dtmf.digit; + switch_safe_free(abuf); return SWITCH_STATUS_SUCCESS; } @@ -1390,6 +1392,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess buf[x] = '\0'; if (x >= buflen || x >= maxdigits) { + switch_safe_free(abuf); return SWITCH_STATUS_SUCCESS; } }