Fix viewer_sdk memory leak 42/244142/1
authorhyunho <hhstark.kang@samsung.com>
Tue, 15 Sep 2020 08:09:06 +0000 (17:09 +0900)
committerhyunho <hhstark.kang@samsung.com>
Tue, 15 Sep 2020 08:09:06 +0000 (17:09 +0900)
Change-Id: I50b2b0c235c02c2b3778dab6ece362827bc1ad96
Signed-off-by: hyunho <hhstark.kang@samsung.com>
widget_viewer_sdk/src/main.c

index da36cab..a353a4f 100644 (file)
@@ -891,12 +891,14 @@ static void _app_control(app_control_h service, void *data)
                ret = watch_holder_create(s_info.win, lifecycle, &s_info, &__watch_holder);
                if (ret != WATCH_HOLDER_ERROR_NONE) {
                        ErrPrint("Watch Holder Error:%d", ret);
+                       free(widget_id);
                        return;
                }
 
                b = bundle_create();
                if (b == NULL) {
                        ErrPrint("Out of memory");
+                       free(widget_id);
                        return;
                }
 
@@ -929,6 +931,8 @@ static void _app_control(app_control_h service, void *data)
                        __resume_process();
                        elm_win_activate(s_info.win);
                }
+               if (lazy_loader)
+                       free(lazy_loader);
        }
 
        if (widget_id)