[Non-ACR] memory leak fixes
[platform/core/api/libaccount-service.git] / 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)