info->background_category = __get_background_category(
bg_category_str);
free(bg_category_str);
+ bg_category_str = NULL;
}
info->for_all_users =
}
info->app_info = (application_x *)g_hash_table_lookup(list, appid);
+ if (!info->app_info || !info->app_info->package) {
+ _LOGD("appinfo for [%s] is not existed for user [%d]",
+ appid, uid);
+ g_hash_table_destroy(list);
+ free(locale);
+ return PMINFO_R_ENOENT;
+ }
info->locale = locale;
info->package = strdup(info->app_info->package);
+ if (!info->package) {
+ _LOGE("out of memory");
+ g_hash_table_destroy(list);
+ free(locale);
+ return PMINFO_R_ERROR;
+ }
/* just free list only */
g_hash_table_steal(list, (gconstpointer)appid);