Fix wrong callback invoke on SHARE PANEL launch 38/79438/1 accepted/tizen/common/20160712.150512 accepted/tizen/ivi/20160712.000133 accepted/tizen/mobile/20160711.235927 accepted/tizen/tv/20160712.000041 accepted/tizen/wearable/20160712.000033 submit/tizen/20160711.122841
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 11 Jul 2016 10:21:34 +0000 (19:21 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 11 Jul 2016 10:21:34 +0000 (19:21 +0900)
Change-Id: I5826d9e306e1a9e849d8ccdc3611f756fe46e4f1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
app_control/app_control.c

index b323f30..1d9e372 100644 (file)
@@ -738,6 +738,11 @@ int app_control_send_launch_request(app_control_h app_control, app_control_reply
                bundle_del(app_control->data, BUNDLE_KEY_OPERATION);
 
        if (launch_pid < 0) {
+               if (request_context->app_control)
+                       app_control_destroy(request_context->app_control);
+
+               free(request_context);
+
                if (launch_pid == APPSVC_RET_ENOMATCH)
                        return app_control_error(APP_CONTROL_ERROR_APP_NOT_FOUND, __FUNCTION__, NULL);
                else if (launch_pid == APPSVC_RET_EILLACC)
@@ -761,7 +766,9 @@ int app_control_send_launch_request(app_control_h app_control, app_control_reply
                aul_add_caller_cb(launch_pid, __handle_launch_result, request_context);
 
                /* launched without app selector */
-               if (strncmp(callee, APP_SELECTOR, strlen(APP_SELECTOR)) != 0)
+               if ((strcmp(callee, APP_SELECTOR) != 0) ||
+                               (strcmp(callee, SHARE_PANEL) != 0))
+
                        aul_invoke_caller_cb(request_context);
 
        } else { /* default case */