From 6a404bcb22d490797853679f467f4e6034bd8c2b Mon Sep 17 00:00:00 2001 From: Abhishek Vijay Date: Mon, 31 May 2021 19:29:31 +0530 Subject: [PATCH] [Non-ACR] memory leak fixes Change-Id: I4f4708330175d57fbe493ba29659937017d45e77 Signed-off-by: Abhishek Vijay --- src/account.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) -- 2.7.4