[4.1] 3a2ea1e Pointlessly fix a resource-leak in bail-out path, spotted by Coverity.

PÃ¥l Hermunn Johansen hermunn at varnish-software.com
Mon Sep 12 15:48:17 CEST 2016


commit 3a2ea1eeb552db8aa1bab3e63432256f4eba03db
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 29 22:24:40 2016 +0000

    Pointlessly fix a resource-leak in bail-out path, spotted by Coverity.

diff --git a/lib/libvcc/vcc_acl.c b/lib/libvcc/vcc_acl.c
index 97728a9..88ae9b4 100644
--- a/lib/libvcc/vcc_acl.c
+++ b/lib/libvcc/vcc_acl.c
@@ -225,6 +225,8 @@ vcc_acl_try_getaddrinfo(struct vcc *tl, struct acl_e *ae)
 				res->ai_family, PF(ae->t_addr));
 			continue;
 		}
+		if (tl->err)
+			freeaddrinfo(res0);
 		ERRCHK(tl);
 	}
 	freeaddrinfo(res0);



More information about the varnish-commit mailing list