Add an exception handling 36/79636/1 accepted/tizen/ivi/20160712.131858 accepted/tizen/mobile/20160712.131811 accepted/tizen/tv/20160712.131829 accepted/tizen/wearable/20160712.131847 submit/tizen/20160712.070510
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 12 Jul 2016 07:03:19 +0000 (16:03 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 12 Jul 2016 07:03:19 +0000 (16:03 +0900)
Change-Id: I95b3dddb9eaf029e536681894f68af00999656fa
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
app_control/app_control.c

index 1d9e372..b01bca9 100644 (file)
@@ -738,10 +738,12 @@ 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);
+               if (request_context) {
+                       if (request_context->app_control)
+                               app_control_destroy(request_context->app_control);
 
-               free(request_context);
+                       free(request_context);
+               }
 
                if (launch_pid == APPSVC_RET_ENOMATCH)
                        return app_control_error(APP_CONTROL_ERROR_APP_NOT_FOUND, __FUNCTION__, NULL);