From: Seonah Moon Date: Wed, 28 Oct 2020 03:11:16 +0000 (+0900) Subject: Fix svace issues X-Git-Tag: submit/tizen/20210126.014105~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1aa3343cb423f3b2fdafcbf674cee68188efedb1;p=platform%2Fcore%2Fapi%2Ftethering.git Fix svace issues MEMORY_LEAK.STRDUP UNINIT.LOCAL_VAR.EX Change-Id: Ib005a7af91de5e935edaa0fba66ef61c42533a31 --- diff --git a/src/tethering.c b/src/tethering.c index 0fca757..f330fb2 100755 --- a/src/tethering.c +++ b/src/tethering.c @@ -3141,6 +3141,7 @@ API int tethering_wifi_set_ssid(tethering_h tethering, const char *ssid) ret = TETHERING_ERROR_OPERATION_FAILED; g_error_free(error); + free(p_ssid); return ret; } @@ -3470,9 +3471,10 @@ API int tethering_wifi_get_channel(tethering_h tethering, int *channel) __tethering_h *th = (__tethering_h *)tethering; #ifdef TIZEN_TV_EXT GDBusProxy *proxy = th->client_bus_proxy; - GVariant *parameters; + GVariant *parameters = NULL; GError *error = NULL; - int ch, vconf_channel; + int ch = -1; + int vconf_channel = -1; tethering_error_e ret = TETHERING_ERROR_NONE; parameters = g_dbus_proxy_call_sync(proxy, "get_wifi_tethering_channel",