From: Changyeon Lee Date: Wed, 24 Jul 2024 07:16:29 +0000 (+0900) Subject: Fix the memory leak when hal_common_get_backend is failed X-Git-Tag: accepted/tizen/unified/x/20240727.073538~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c3cb73c2705ffefbafbb67fa4d34ff124df1b93;p=platform%2Fhal%2Fapi%2Ftdm.git Fix the memory leak when hal_common_get_backend is failed Change-Id: I3877e91f3421f0eff3da3c5ed141534ecb6657f7 --- diff --git a/src/hal-api-tdm.c b/src/hal-api-tdm.c index 6914f4b..fea516b 100644 --- a/src/hal-api-tdm.c +++ b/src/hal-api-tdm.c @@ -277,7 +277,7 @@ hal_tdm_get_backend(hal_tdm_error *error) HAL_TDM_ERR("Failed to get backend\n"); if (error) *error = HAL_TDM_ERROR_NO_MODULE; - return NULL; + goto fail; } g_hal_tdm_backend_data = (hal_tdm_backend_data *)backend_data;