[master] 6cef6e770 Make sure the vav is always freed.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Jul 19 08:39:07 UTC 2021
commit 6cef6e7708a30554252f77215d7c872ce46ce865
Author: Poul-Henning Kamp <phk at 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(¯o_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 *
More information about the varnish-commit
mailing list