diff --git a/channels/chan_zap.c b/channels/chan_zap.c index e040fc3c40e5ab5f09e6760c597812ae2e81e3d2..b8425eb590d685b320608dbf454a696dfd1a6ac8 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -10528,8 +10528,7 @@ static int setup_zap(int reload) res = ioctl(ctlfd, ZT_SET_DIALPARAMS, &dps); if (res < 0) { ast_log(LOG_ERROR, "Invalid tone duration: %d ms\n", toneduration); - destroy_zt_pvt(&tmp); - return NULL; + return -1; } } close(ctlfd);