From: Abhishek Vijay Date: Mon, 31 May 2021 13:59:31 +0000 (+0530) Subject: [Non-ACR] memory leak fixes X-Git-Tag: submit/tizen/20210610.065111^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a404bcb22d490797853679f467f4e6034bd8c2b;p=platform%2Fcore%2Fapi%2Flibaccount-service.git [Non-ACR] memory leak fixes Change-Id: I4f4708330175d57fbe493ba29659937017d45e77 Signed-off-by: Abhishek Vijay --- diff --git a/src/account.c b/src/account.c index 1b89ea1..081cf88 100644 --- a/src/account.c +++ b/src/account.c @@ -3081,13 +3081,13 @@ static void _account_subscribe_vconf_callback_ex(keynode_t *key, void *user_data event_type = strtok_r(msg, ":", &ptr); if (event_type == NULL) { ACCOUNT_ERROR("event_type is NULL"); - return; + goto END; } id = strtok_r(NULL, ":", &ptr); if (id == NULL) { ACCOUNT_ERROR("account-id is NULL"); - return; + goto END; } ACCOUNT_SLOGD("msg(%s), event_type(%s), id(%s)", msg, event_type, id); @@ -3100,8 +3100,9 @@ static void _account_subscribe_vconf_callback_ex(keynode_t *key, void *user_data tmp->account_subscription_callback(event_msg, account_id, tmp->user_data); } +END: _ACCOUNT_FREE(msg); - + return; } ACCOUNT_API int account_unsubscribe_notification_ex(account_subscribe_h account_subscribe)