diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-10-15 09:08:09 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2022-10-15 09:26:58 -0400 |
commit | 12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69 (patch) | |
tree | b4885951a5cba1b78c21b30ce37a1d6f1574aa5f /apps/recorder | |
parent | 9d3d925295112a0080bc1d70fad170db9e1af2a9 (diff) | |
download | rockbox-12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69.tar.gz rockbox-12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69.zip |
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
Diffstat (limited to 'apps/recorder')
-rw-r--r-- | apps/recorder/pcm_record.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) | |||
1437 | audio_set_output_source(AUDIO_SRC_PLAYBACK); | 1437 | audio_set_output_source(AUDIO_SRC_PLAYBACK); |
1438 | pcm_apply_settings(); | 1438 | pcm_apply_settings(); |
1439 | 1439 | ||
1440 | if (pcmrec_handle > 0) | 1440 | pcmrec_handle = core_free(pcmrec_handle); |
1441 | pcmrec_handle = core_free(pcmrec_handle); | ||
1442 | talk_buffer_set_policy(TALK_BUFFER_DEFAULT); | 1441 | talk_buffer_set_policy(TALK_BUFFER_DEFAULT); |
1443 | 1442 | ||
1444 | send_event(RECORDING_EVENT_STOP, NULL); | 1443 | send_event(RECORDING_EVENT_STOP, NULL); |