From: Cheoleun Moon Date: Tue, 18 May 2021 09:53:24 +0000 (+0900) Subject: Check return value of g_unlink X-Git-Tag: accepted/tizen/unified/20210602.122538~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e4684b7b366be4374883d809ebf0b20b62b661e;p=apps%2Fnative%2Fug-wifi-efl.git Check return value of g_unlink Change-Id: I22238a1a5bf606af992a55e1d19868b2fdd3adcf Signed-off-by: Cheoleun Moon --- diff --git a/common/common_eap_connect.c b/common/common_eap_connect.c index f3c1581..2db3193 100644 --- a/common/common_eap_connect.c +++ b/common/common_eap_connect.c @@ -378,15 +378,21 @@ static void _gl_eap_user_cert_sel(void *data, Evas_Object *obj, } if (eap_data->ca_cert_path) { - g_unlink(eap_data->ca_cert_path); + if (g_unlink(eap_data->ca_cert_path) < 0) + INFO_LOG(UG_NAME_ERR, "g_unlink fails. %s", eap_data->ca_cert_path); + g_free(eap_data->ca_cert_path); eap_data->ca_cert_path = NULL; } if (eap_data->user_cert_path) { - g_unlink(eap_data->user_cert_path); + if (g_unlink(eap_data->user_cert_path) < 0) + INFO_LOG(UG_NAME_ERR, "g_unlink fails. %s", eap_data->user_cert_path); + g_free(eap_data->user_cert_path); eap_data->user_cert_path = NULL; } if (eap_data->privatekey_path) { - g_unlink(eap_data->privatekey_path); + if (g_unlink(eap_data->privatekey_path) < 0) + INFO_LOG(UG_NAME_ERR, "g_unlink fails. %s", eap_data->privatekey_path); + g_free(eap_data->privatekey_path); eap_data->privatekey_path = NULL; }