Add new elements for component-based application
[platform/core/appfw/pkgmgr-info.git] / src / pkgmgrinfo_basic.c
index 381c0ac..1c1103a 100644 (file)
@@ -232,6 +232,21 @@ static void __ps_free_splashscreen(gpointer data)
        free((void *)splashscreen);
 }
 
+static void __ps_free_component_info(gpointer data)
+{
+       component_x *component = (component_x *)data;
+
+       if (component == NULL)
+               return;
+       if (component->id)
+               free((void *)component->id);
+       if (component->type)
+               free((void *)component->type);
+       if (component->launch_mode)
+               free((void *)component->launch_mode);
+       free((void *)component);
+}
+
 static void __ps_free_privilege(gpointer data)
 {
        privilege_x *privilege = (privilege_x *)data;
@@ -421,6 +436,8 @@ static void __ps_free_application(gpointer data)
        g_list_free_full(application->background_category, free);
        /*Free SplashScreen*/
        g_list_free_full(application->splashscreens, __ps_free_splashscreen);
+       /*Free ComponentInfo*/
+       g_list_free_full(application->components, __ps_free_component_info);
 
        free((void *)application);
 }