From: Anthony Minessale Date: Fri, 9 May 2014 19:35:32 +0000 (+0500) Subject: FS-6515 --resolve X-Git-Tag: v1.5.12~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=717bcf617e90a3929704e701cb9596b2a04e7517;p=thirdparty%2Ffreeswitch.git FS-6515 --resolve --- diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 01b8775846..db43e6a7bd 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -1318,6 +1318,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; } } @@ -1381,6 +1382,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; } @@ -1389,6 +1391,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; } }