From 1aa3343cb423f3b2fdafcbf674cee68188efedb1 Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Wed, 28 Oct 2020 12:11:16 +0900 Subject: [PATCH] Fix svace issues MEMORY_LEAK.STRDUP UNINIT.LOCAL_VAR.EX Change-Id: Ib005a7af91de5e935edaa0fba66ef61c42533a31 --- src/tethering.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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", -- 2.34.1