Fix svace issues 04/246304/1
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 28 Oct 2020 03:11:16 +0000 (12:11 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 28 Oct 2020 03:11:53 +0000 (12:11 +0900)
MEMORY_LEAK.STRDUP
UNINIT.LOCAL_VAR.EX

Change-Id: Ib005a7af91de5e935edaa0fba66ef61c42533a31

src/tethering.c

index 0fca757..f330fb2 100755 (executable)
@@ -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",