From: Hwankyu Jhun Date: Mon, 30 May 2016 07:25:34 +0000 (+0900) Subject: Fix the exception handling about app_control_send_launch_request API X-Git-Tag: submit/tizen/20170725.231500~6^2~63 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6984e5d47ccc088fe4089113b2e7bde4a8318539;p=platform%2Fcore%2Fapi%2Fpreference.git Fix the exception handling about app_control_send_launch_request API Change-Id: I300b03a1a2ca18f820d2f83400ae56b28ecd0e13 Signed-off-by: Hwankyu Jhun --- diff --git a/app_control/app_control.c b/app_control/app_control.c index f7b8ec6..b323f30 100644 --- a/app_control/app_control.c +++ b/app_control/app_control.c @@ -687,6 +687,7 @@ int app_control_send_launch_request(app_control_h app_control, app_control_reply bool implicit_default_operation = false; int launch_pid; app_control_request_context_h request_context = NULL; + int ret; if (app_control_validate(app_control)) return app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); @@ -719,9 +720,10 @@ int app_control_send_launch_request(app_control_h app_control, app_control_reply request_context->reply_cb = callback; - if (app_control_clone(&request_clone, app_control) != APP_CONTROL_ERROR_NONE) { + ret = app_control_clone(&request_clone, app_control); + if (ret != APP_CONTROL_ERROR_NONE) { free(request_context); - return app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER, __FUNCTION__, "failed to clone the app_control request handle"); + return app_control_error(ret, __FUNCTION__, "failed to clone the app_control request handle"); } request_context->app_control = request_clone;