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/gui/skin_engine/skin_parser.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'apps/gui/skin_engine/skin_parser.c') diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 6021f0647c..26a251bb4b 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -1829,9 +1829,7 @@ void skin_data_free_buflib_allocs(struct wps_data *wps_data) abort: wps_data->font_ids = PTRTOSKINOFFSET(skin_buffer, NULL); /* Safe if skin_buffer is NULL */ wps_data->images = PTRTOSKINOFFSET(skin_buffer, NULL); - if (wps_data->buflib_handle > 0) - core_free(wps_data->buflib_handle); - wps_data->buflib_handle = -1; + wps_data->buflib_handle = core_free(wps_data->buflib_handle); #endif } -- cgit v1.2.3