[master] cf20e04 plug minor leaks reported by coverity

Poul-Henning Kamp phk at phk.freebsd.dk
Sat May 5 08:44:05 UTC 2018


--------
In message <20180505082622.2438561CEE at lists.varnish-cache.org>, Nils Goroll wri
tes:

>+++ b/lib/libvcc/vcc_expr.c
>@@ -300,6 +300,7 @@ vcc_Eval_Regsub(struct vcc *tl, struct expr **e, struct token *t,
> 	ExpectErr(tl, CSTR);
> 	p = vcc_regexp(tl);
> 	bprintf(buf, "VRT_regsub(ctx, %d,\v+\n\v1,\n%s", all, p);
>+	free(TRUST_ME(p));

We shouldn't use TRUST_ME for trivial issues like this, it is only
for use in the most extreme cases (typically börken external APIs
we have to work with.)


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the varnish-commit mailing list