Fix BS on dialer (NULL check to destroy handle) 20/47420/1
authorSunggoo Kim <sung.goo.kim@samsung.com>
Sun, 24 May 2015 10:48:19 +0000 (19:48 +0900)
committerGukhwan Cho <gh78.cho@samsung.com>
Thu, 3 Sep 2015 08:09:42 +0000 (17:09 +0900)
Change-Id: I0447893e5fa283c9d3ad89fab6e0fd099b5b2e85

client/ctsvc_client_service.c

index ea2675a..347d589 100644 (file)
@@ -78,7 +78,7 @@ API int contacts_disconnect(void)
        unsigned int id = ctsvc_client_get_pid();
 
        ret = ctsvc_client_handle_get_p_with_id(id, &contact);
-       RETV_IF(CONTACTS_ERROR_NO_DATA == ret, CONTACTS_ERROR_NONE);
+       RETV_IF(NULL == contact, CONTACTS_ERROR_DB);
        RETVM_IF(CONTACTS_ERROR_NONE != ret, ret, "ctsvc_client_handle_get_p_with_id() Fail(%d)", ret);
 
        ret = ctsvc_client_disconnect(contact);
@@ -123,7 +123,7 @@ API int contacts_disconnect_on_thread(void)
        unsigned int id = ctsvc_client_get_tid();
 
        ret = ctsvc_client_handle_get_p_with_id(id, &contact);
-       RETV_IF(CONTACTS_ERROR_NO_DATA == ret, CONTACTS_ERROR_NONE);
+       RETV_IF(NULL == contact, CONTACTS_ERROR_DB);
        RETVM_IF(CONTACTS_ERROR_NONE != ret, ret, "ctsvc_client_handle_get_p_with_id() Fail(%d)", ret);
 
        ret = ctsvc_client_disconnect_on_thread(contact);