From 12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sat, 15 Oct 2022 09:08:09 -0400 Subject: move buflib_free invalid handle check to the function allow buflib_free to check for invalid or already freed handles within the function -- remove all the invalid handle guards thru core_free Change-Id: Ibdcbc82760fc93b674c42283fca420d94907df8e --- apps/recorder/pcm_record.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/recorder/pcm_record.c') diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c index 0f6e8469ec..d3d45d3e1c 100644 --- a/apps/recorder/pcm_record.c +++ b/apps/recorder/pcm_record.c @@ -1437,8 +1437,7 @@ static void on_close_recording(void) audio_set_output_source(AUDIO_SRC_PLAYBACK); pcm_apply_settings(); - if (pcmrec_handle > 0) - pcmrec_handle = core_free(pcmrec_handle); + pcmrec_handle = core_free(pcmrec_handle); talk_buffer_set_policy(TALK_BUFFER_DEFAULT); send_event(RECORDING_EVENT_STOP, NULL); -- cgit v1.2.3