return;
dup = strdup(appcontrol_str);
+ if (dup == NULL) {
+ _LOGE("out of memory");
+ return;
+ }
+
do {
ac = calloc(1, sizeof(appcontrol_x));
if (ac == NULL) {
strcasecmp(tmp_record, "false") == 0) {
free(info->is_disabled);
info->is_disabled = tmp_record;
+ } else {
+ free(tmp_record);
}
}
tmp_record = NULL;
strcasecmp(tmp_record, "false") == 0) {
free(info->splash_screen_display);
info->splash_screen_display = tmp_record;
+ } else {
+ free(tmp_record);
}
}
}
if (locale == NULL)
return PMINFO_R_ERROR;
- list = g_hash_table_new(g_str_hash, g_str_equal);
+ list = g_hash_table_new_full(g_str_hash, g_str_equal, NULL,
+ __free_applications);
if (list == NULL) {
free(locale);
return PMINFO_R_ERROR;
ret = _appinfo_get_applications(GLOBAL_USER, uid, locale, filter,
PMINFO_APPINFO_GET_ALL, list);
+ if (ret != PMINFO_R_OK) {
+ g_hash_table_destroy(list);
+ free(locale);
+ return ret;
+ }
+
if (!g_hash_table_size(list)) {
_LOGD("appinfo for [%s] is not existed for user [%d]",
appid, uid);
info->package = strdup(info->app_info->package);
/* just free list only */
+ g_hash_table_steal(list, (gconstpointer)appid);
g_hash_table_destroy(list);
*handle = info;