Skip to content

Commit

Permalink
addressed memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
hari committed Apr 9, 2021
1 parent 3f2f1e6 commit d2e5ca5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/switch_ivr_play_say.c
Original file line number Diff line number Diff line change
Expand Up @@ -1834,11 +1834,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
sp_prev_idx += olen;

if (cont) {
switch_safe_free(data);
continue;
}
} else {
sp_prev_idx = 0;
extra = 0;
currp = bp;
}

Expand Down Expand Up @@ -1986,6 +1986,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
break;
}
}
if (sp_prev) { switch_safe_free(sp_prev); }

switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "done playing file %s\n", file);
switch_channel_set_variable_printf(channel, "playback_last_offset_pos", "%d", fh->offset_pos);
Expand Down

0 comments on commit d2e5ca5

Please sign in to comment.