From: Jaehoon Chung Date: Thu, 22 Dec 2022 03:22:54 +0000 (+0900) Subject: hal-api: common: fix the error handling path X-Git-Tag: accepted/tizen/unified/20230105.154657^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4b9e661e0e318a2794034ef24e1b0295c59e882;p=platform%2Fhal%2Fapi%2Fcommon.git hal-api: common: fix the error handling path Before calling hal_api_conf_exit(), it needs to call close_backend(). Otherwise, hal_api_conf_exit will call free(info) before info->backend/handle. Change-Id: If9b3b66d3bb7c9e5d92ebd565815c13bde4babdb Signed-off-by: Jaehoon Chung --- diff --git a/src/hal-api-common.c b/src/hal-api-common.c index d11226b..47f033b 100644 --- a/src/hal-api-common.c +++ b/src/hal-api-common.c @@ -320,8 +320,8 @@ static int __get_backend(enum hal_module module, void **data, return 0; err_dlclose: - _hal_api_conf_exit(); __close_backend(info); + _hal_api_conf_exit(); err: G_UNLOCK(hal_common_lock); return ret;