Fix Coverity issues 88/209588/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/5.5/unified/20191031.014810 accepted/tizen/5.5/unified/mobile/hotfix/20201027.081919 accepted/tizen/5.5/unified/wearable/hotfix/20201027.123241 accepted/tizen/6.0/unified/20201030.122928 accepted/tizen/6.0/unified/hotfix/20201103.051919 accepted/tizen/unified/20190711.062908 submit/tizen/20190710.102723 submit/tizen_5.5/20191031.000001 submit/tizen_5.5_mobile_hotfix/20201026.185101 submit/tizen_5.5_wearable_hotfix/20201026.184301 submit/tizen_6.0/20201029.205101 submit/tizen_6.0_hotfix/20201102.192501 submit/tizen_6.0_hotfix/20201103.114801 tizen_5.5.m2_release tizen_6.0.m2_release
authorJung Jihoon <jh8801.jung@samsung.com>
Tue, 9 Jul 2019 07:09:58 +0000 (16:09 +0900)
committerJung Jihoon <jh8801.jung@samsung.com>
Tue, 9 Jul 2019 07:10:34 +0000 (16:10 +0900)
- 1048222, 1048244 : Resource Leak

Change-Id: I856193980127bf14f12beb0a38bcb648bae486e2
Signed-off-by: Jung Jihoon <jh8801.jung@samsung.com>
wearable/app/src/nsa-view-tap-n-pay.c

index cb1050c..2af6a07 100755 (executable)
@@ -281,6 +281,8 @@ static bool __set_default_wallet(item_data_t *item)
 
                __launch_application(launch_app_id);
 
+               NSA_MEM_FREE(launch_app_id);
+
                return true;
        }
 
@@ -406,7 +408,10 @@ static Evas_Object *__gl_content_get(void *data, Evas_Object *obj,
                        char *appid;
 
                        winfo = g_array_index(ad->payment_wallet_list, wallet_info_t *, item->index);
-                       retv_if(winfo == NULL, NULL);
+                       if (winfo == NULL) {
+                               NSA_MEM_FREE(wallet_handler);
+                               return NULL;
+                       }
                        appid = winfo->appid;
                        if (strlen(wallet_handler) > 0 && strcmp(appid, wallet_handler) == 0) {
                                NSA_DEBUG("matched, [%s]", appid);