info->uid = uid;
info->tbl = g_hash_table_new_full(g_str_hash, g_str_equal, NULL,
_free_appinfo);
+ if (info->tbl == NULL) {
+ _E("out of memory");
+ return NULL;
+ }
g_hash_table_insert(user_tbl, GINT_TO_POINTER(uid), info);
user_tbl = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL,
_free_user_appinfo);
+ if (user_tbl == NULL)
+ return -1;
pkg_pending = g_hash_table_new_full(g_str_hash, g_str_equal,
free, free);
/* search again from global table */
info = _find_user_appinfo(GLOBAL_USER);
+ if (info == NULL) {
+ _E("cannot find global appinfo table!");
+ return NULL;
+ }
return g_hash_table_lookup(info->tbl, appid);
}