[master] 82be6f46a param: Plug leak spotted by lsan

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Dec 14 16:02:06 UTC 2021


commit 82be6f46a73a99bff56e51140e138c569f34ff36
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Dec 14 17:01:03 2021 +0100

    param: Plug leak spotted by lsan

diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index 4070ddb42..d023b6e72 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -264,6 +264,7 @@ mcf_param_show(struct cli *cli, const char * const *av, void *priv)
 		if (show != NULL) {
 			VCLI_SetResult(cli, CLIS_TOOMANY);
 			VCLI_Out(cli, "Too many parameters");
+			VSB_destroy(&vsb);
 			return;
 		}
 		show = av[n];
@@ -388,6 +389,7 @@ mcf_param_show_json(struct cli *cli, const char * const *av, void *priv)
 		if (show != NULL) {
 			VCLI_SetResult(cli, CLIS_TOOMANY);
 			VCLI_Out(cli, "Too many parameters");
+			VSB_destroy(&vsb);
 			return;
 		}
 		show = av[i];


More information about the varnish-commit mailing list