]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix memory leak in IP address unit test
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 28 Jan 2013 11:22:25 +0000 (04:22 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 28 Jan 2013 11:22:25 +0000 (04:22 -0700)
Another failure to call FreeAddrInfo() after calling GetAddrInfo().

 Detected by Coverity Scan. Issue 740438.

src/ip/testAddress.cc

index c69ab8f7cbd05423ba7c87f0f88498e0a472cc38..17838b7b367c8f5df203961f2b4cd45fddd32507 100644 (file)
@@ -714,6 +714,7 @@ testIpAddress::testAddrInfo()
     CPPUNIT_ASSERT( memcmp( expect->ai_addr, ipval->ai_addr, expect->ai_addrlen ) == 0 );
 
     freeaddrinfo(expect);
+    anIP.FreeAddrInfo(ipval);
 }
 
 void