From: Jihoon Kim Date: Thu, 25 Apr 2024 09:34:55 +0000 (+0900) Subject: Fix crash issue on terminate X-Git-Tag: accepted/tizen/7.0/unified/20240530.162723~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F80%2F310480%2F1;p=platform%2Fcore%2Fuifw%2Fautofill.git Fix crash issue on terminate Prevents autofill_service_send_error_info() invoke with a delegate handle that has already been disconnected Change-Id: I1fadac0127957ca9bcbff4ba3e09e5a94b818795 Signed-off-by: Jihoon Kim --- diff --git a/service_lib/autofill_service.c b/service_lib/autofill_service.c index 45ecc6a..d193df8 100644 --- a/service_lib/autofill_service.c +++ b/service_lib/autofill_service.c @@ -507,6 +507,21 @@ EXPORT_API int autofill_service_deinitialize(void) __client_list = NULL; } + if (g_auth_info_cb) + rpc_port_stub_AutofillSvcPort_autofill_svc_auth_info_cb_destroy(g_auth_info_cb); + + g_auth_info_cb = NULL; + + if (g_send_error_cb) + rpc_port_stub_AutofillSvcPort_autofill_svc_send_error_cb_destroy(g_send_error_cb); + + g_send_error_cb = NULL; + + if (g_fill_response_received_cb) + rpc_port_stub_AutofillSvcPort_autofill_svc_fill_response_cb_destroy(g_fill_response_received_cb); + + g_fill_response_received_cb = NULL; + rpc_port_stub_AutofillSvcPort_unregister(); __initialized = false; @@ -782,6 +797,8 @@ EXPORT_API int autofill_service_send_error_info(int context_id, autofill_error_i autofill_error_e error_code; rpc_port_stub_autofill_svc_error_info_h error_info_h = NULL; + LOGI("context id(%d)", context_id); + if (!h) { LOGW("[ERROR] Invalid parameter"); return AUTOFILL_ERROR_INVALID_PARAMETER;