From: Yu Date: Tue, 18 May 2021 03:46:28 +0000 (+0900) Subject: Fix coverity issue X-Git-Tag: accepted/tizen/6.5/unified/20211028.101218~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fconnectivity%2Fwifi-direct-manager.git;a=commitdiff_plain;h=74d80822db288cc037ab2bfd15bbbea036fcecc8 Fix coverity issue Change-Id: I31263cd982b0e00be6bf779072081125f3f8b62c --- diff --git a/packaging/wifi-direct-manager.spec b/packaging/wifi-direct-manager.spec index 2762cce..9867706 100644 --- a/packaging/wifi-direct-manager.spec +++ b/packaging/wifi-direct-manager.spec @@ -6,7 +6,7 @@ Name: wifi-direct-manager Summary: Wi-Fi Direct manger -Version: 1.3.6 +Version: 1.3.7 Release: 1 Group: Network & Connectivity/Wireless License: Apache-2.0 diff --git a/src/wifi-direct-util.c b/src/wifi-direct-util.c index 4754ab7..b01a532 100644 --- a/src/wifi-direct-util.c +++ b/src/wifi-direct-util.c @@ -807,7 +807,7 @@ void _wfd_util_check_country_cb(keynode_t *key, void *data) char *ccode; GKeyFile *keyfile = NULL; const char *file_path = COUNTRY_CODE_FILE; - GError * err = NULL; + GError *err = NULL; if (!manager) { WDS_LOGE("Invalid parameter"); @@ -827,6 +827,7 @@ void _wfd_util_check_country_cb(keynode_t *key, void *data) if (!res) { WDS_LOGE("Failed to load key file(%s)", err->message); g_key_file_free(keyfile); + g_error_free(err); return; } @@ -834,6 +835,7 @@ void _wfd_util_check_country_cb(keynode_t *key, void *data) if (!ccode) { WDS_LOGE("Failed to get country code string(%s)", err->message); g_key_file_free(keyfile); + g_error_free(err); return; }