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/rbcodec_helpers.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'apps/rbcodec_helpers.c') diff --git a/apps/rbcodec_helpers.c b/apps/rbcodec_helpers.c index 78e068ded7..b856d7355d 100644 --- a/apps/rbcodec_helpers.c +++ b/apps/rbcodec_helpers.c @@ -87,10 +87,7 @@ void tdspeed_free_buffers(int32_t **buffers, int nbuf) { for (int i = 0; i < nbuf; i++) { - if (handles[i] > 0) - core_free(handles[i]); - - handles[i] = 0; + handles[i] = core_free(handles[i]); buffers[i] = NULL; } } -- cgit v1.2.3