]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6515 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 9 May 2014 19:35:32 +0000 (00:35 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 9 May 2014 19:35:48 +0000 (00:35 +0500)
src/switch_ivr.c

index 987796941b185c272d8bc39a6c5f7c3b98c69412..7d6b7c30856504baf120757aae1a404a597cccd7 100644 (file)
@@ -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;
                                }
                        }