[Non-ACR] memory leak fixes 71/259071/1 accepted/tizen/unified/20210611.145013 submit/tizen/20210610.065111
authorAbhishek Vijay <abhishek.v@samsung.com>
Mon, 31 May 2021 13:59:31 +0000 (19:29 +0530)
committerAbhishek Vijay <abhishek.v@samsung.com>
Mon, 31 May 2021 13:59:31 +0000 (19:29 +0530)
Change-Id: I4f4708330175d57fbe493ba29659937017d45e77
Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
src/account.c

index 1b89ea1..081cf88 100644 (file)
@@ -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)