[master] 26aa43eb2 Plug minor leak reported by coverity

Federico G. Schwindt fgsch at lodoss.net
Sun Jun 30 20:14:10 UTC 2019


commit 26aa43eb283b657c03b8b26e6b0c5fad98a8a13a
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Sun Jun 30 21:02:08 2019 +0100

    Plug minor leak reported by coverity

diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index beb4bfe1d..a65c26df9 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -569,6 +569,7 @@ ip_magic(void)
 	sa = VSS_ResolveOne(NULL, "127.0.0.1", "0", 0, SOCK_STREAM, 0);
 	AN(sa);
 	bad_backend_fd = VTCP_bind(sa, NULL);
+	free(sa);
 	assert(bad_backend_fd >= 0);
 	VTCP_myname(bad_backend_fd, abuf, sizeof abuf, pbuf, sizeof(pbuf));
 	extmacro_def("localhost", "%s", abuf);


More information about the varnish-commit mailing list