Mailing List Archive

[master] 6cef6e770 Make sure the vav is always freed.
commit 6cef6e7708a30554252f77215d7c872ce46ce865
Author: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Mon Jul 19 08:22:45 2021 +0000

Make sure the vav is always freed.

Spotted by: Coverity

diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c
index 1a4988cbb..a73cc0b87 100644
--- a/bin/varnishtest/vtc.c
+++ b/bin/varnishtest/vtc.c
@@ -259,6 +259,8 @@ macro_cat(struct vtclog *vl, struct vsb *vsb, const char *b, const char *e)
}
AZ(pthread_mutex_unlock(&macro_mtx));

+ VAV_Free(argv);
+
if (err != NULL)
vtc_fatal(vl, "Macro ${%.*s} failed: %s",
(int)(e - b), b, err);
@@ -273,7 +275,6 @@ macro_cat(struct vtclog *vl, struct vsb *vsb, const char *b, const char *e)

VSB_cat(vsb, retval);
free(retval);
- VAV_Free(argv);
}

struct vsb *
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit