[CID-1048240, 1048221] Fix resource leak 78/209478/1 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.030541 accepted/tizen/5.5/unified/mobile/hotfix/20201027.065247 accepted/tizen/unified/20190712.115333 submit/tizen/20190710.225804 submit/tizen_5.5/20191031.000002 submit/tizen_5.5_mobile_hotfix/20201026.185102 tizen_5.5.m2_release
authorSeonah Moon <seonah1.moon@samsung.com>
Mon, 8 Jul 2019 07:41:35 +0000 (16:41 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Mon, 8 Jul 2019 07:41:39 +0000 (16:41 +0900)
Change-Id: Icf38109953a50695b168fc14e6ae37b489fb9c66

packaging/capi-network-softap.spec
src/softap.c

index a4a1a3e035fb363714f6b08a1449da60550cf4ff..6dbbfcafe86dae92b63417988220b72fcfbad258 100644 (file)
@@ -1,6 +1,6 @@
 Name:          capi-network-softap
 Summary:       Softap Framework
-Version:       0.0.28
+Version:       0.0.29
 Release:       1
 Group:         System/Network
 License:       Apache-2.0
index 6f7ac0aaa06e8bc9db3f6f1e6c879c0fc358afb2..5f1606c71f4b9b91c26f96d2cb79f481df480559 100755 (executable)
@@ -94,6 +94,8 @@ static int __get_common_ssid(char *ssid, unsigned int size)
        if (!g_utf8_validate(ssid, -1, (const char **)&end))
                *end = '\0';
 
+       free(device_name);
+
        return SOFTAP_ERROR_NONE;
 }
 
@@ -707,8 +709,10 @@ static bool __get_ssid_from_vconf(const char *path, char *ssid, unsigned int siz
        char *ptr_tmp = NULL;
 
        ptr = vconf_get_str(path);
-       if (ptr == NULL || strlen(ptr) == 0)
+       if (ptr == NULL || strlen(ptr) == 0) {
+               free(ptr);
                return false;
+       }
 
        if (!g_utf8_validate(ptr, -1, (const char **)&ptr_tmp))
                *ptr_tmp = '\0';