Fix memory leak 83/223983/1
authorhyunho <hhstark.kang@samsung.com>
Wed, 5 Feb 2020 08:24:19 +0000 (17:24 +0900)
committerhyunho <hhstark.kang@samsung.com>
Wed, 5 Feb 2020 08:24:19 +0000 (17:24 +0900)
Change-Id: I68302c617779281c9721ba5eece90b22eb949a73
Signed-off-by: hyunho <hhstark.kang@samsung.com>
parser/widget_plugin_parser.c
src/widget_instance.c

index bb63711..4b66b6c 100644 (file)
@@ -191,6 +191,7 @@ static int _parse_widget_class(xmlNode *node, const char *appid, GList **apps)
 
        val = _get_attribute(node, "classid");
        if (val == NULL) {
+               free(wc->appid);
                free(wc);
                return -1;
        }
index 19cf3cd..793a693 100644 (file)
@@ -1232,6 +1232,7 @@ EAPI int widget_instance_listen_status(const char *widget_id, widget_instance_ev
                lifecycle_tbl = g_hash_table_new_full(g_str_hash, g_str_equal, NULL,
                                __destroy_lifecycle_local);
                if (!lifecycle_tbl) {
+                       free(cb_info->widget_id);
                        free(cb_info);
                        return -1;
                }