[master] 808472c5c Coverity spotted this as a resource-leak, even though it amounts to counting deck-chairs on the Titanic.

Poul-Henning Kamp phk at FreeBSD.org
Mon Aug 6 06:42:06 UTC 2018


commit 808472c5c276fa40f2acc24abb24b5cbcff83163
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 6 06:40:33 2018 +0000

    Coverity spotted this as a resource-leak, even though it amounts to
    counting deck-chairs on the Titanic.

diff --git a/lib/libvcc/vcc_expr.c b/lib/libvcc/vcc_expr.c
index b9ad25a8e..dacb32260 100644
--- a/lib/libvcc/vcc_expr.c
+++ b/lib/libvcc/vcc_expr.c
@@ -1224,6 +1224,7 @@ vcc_expr_bin_bool(struct vcc *tl, struct expr **e, vcc_type_t fmt,
 			    "'%s' must be followed by BOOL,"
 			    " found %s.\n", tokstr, vcc_utype(e2->fmt));
 			vcc_ErrWhere2(tl, tk, tl->t);
+			vcc_delete_expr(e2);
 			return;
 		}
 		bprintf(buf, "\v1\v-\n%s\v+\n\v2", tokstr);


More information about the varnish-commit mailing list