delete control;
return CAPMGR_ERROR_OUT_OF_MEMORY;
}
+ int r = aul_svc_set_operation(control->b, AUL_SVC_OPERATION_DEFAULT);
+ if (r != AUL_SVC_RET_OK) {
+ bundle_free(control->b);
+ delete control;
+ return CAPMGR_ERROR_OUT_OF_MEMORY;
+ }
*app_control = control;
} catch (const std::bad_alloc& e) {
LOG(ERROR) << e.what();
int r;
const char* val = aul_svc_get_operation(app_control->b);
- if (!val) {
- r = aul_svc_set_operation(app_control->b, AUL_SVC_OPERATION_DEFAULT);
- if (r != AUL_SVC_RET_OK)
- return CAPMGR_ERROR_OUT_OF_MEMORY;
- val = AUL_SVC_OPERATION_DEFAULT;
- }
+ if (!val)
+ return CAPMGR_ERROR_INVALID_PARAMETER;
*operation = strdup(val);
if (*operation == nullptr)