Fix memory leak 71/239471/1
authorCheoleun Moon <chleun.moon@samsung.com>
Mon, 27 Jul 2020 04:44:02 +0000 (13:44 +0900)
committerCheoleun Moon <chleun.moon@samsung.com>
Mon, 27 Jul 2020 04:44:07 +0000 (13:44 +0900)
Change-Id: I82caac7a12929e7c584ce210c9e10a96216baccc

tests/tct-nsd-core.cpp
tests/utc-nsd-dnssd-browse.c

index 4468a42..fec5ee4 100755 (executable)
@@ -75,6 +75,7 @@ TEST(nsd, nsd){
                else
                {
                        dlog_print(DLOG_INFO, "NativeTCT", "Name check error! [%s][%s]", pszGetTCName, tc_array[i].name);
+                       FREE_MEMORY_TC(pszGetTCName);
                        ASSERT_EQ(0, 1);
                }
        }
index c2e9adf..accf12f 100644 (file)
@@ -376,6 +376,7 @@ int utc_nsd_dnssd_service_get_ip_n1(void)
        }
 
        ret = dnssd_service_get_ip(service_id, &ip_v4_address, NULL);
+       free(ip_v4_address);
        assert_eq(ret, DNSSD_ERROR_SERVICE_NOT_FOUND);
 
        return 0;