- _D("uid(%d), appid(%s), component_type(%d)", *p_uid, appid, component_type);
- if (component_type == PMINFO_SVC_APP) {
- esd_appctrl_cb_data *cb_data = calloc(1, sizeof(esd_appctrl_cb_data));
- if (cb_data == NULL) {
- _E("memory alloc failed");
- return ES_R_ENOMEM;
- }
- cb_data->appid = strdup(appid);
- if (cb_data->appid == NULL) {
- _E("out_of_memory");
- FREE_AND_NULL(cb_data);
- return ES_R_ENOMEM;
- }
- cb_data->pkgid = strdup(pkgid);
- if (cb_data->pkgid == NULL) {
- _E("out_of_memory");
- FREE_AND_NULL(cb_data->appid);
- FREE_AND_NULL(cb_data);
- return ES_R_ENOMEM;
- }
- cb_data->uid = *p_uid;
- ret = pkgmgrinfo_appinfo_foreach_appcontrol(handle,
- (pkgmgrinfo_app_control_list_cb)__esd_appcontrol_cb, cb_data);
-
- FREE_AND_NULL(cb_data->pkgid);
+ if (cb_data == NULL) {
+ _E("memory alloc failed");
+ return ES_R_ENOMEM;
+ }
+ cb_data->appid = strdup(appid);
+ if (cb_data->appid == NULL) {
+ _E("out_of_memory");
+ FREE_AND_NULL(cb_data);
+ return ES_R_ENOMEM;
+ }
+ cb_data->pkgid = strdup(pkgid);
+ if (cb_data->pkgid == NULL) {
+ _E("out_of_memory");