[master] 5a39e0cd1 Free the CLI answer, also in terminal circumstances, to silence Coverity

Poul-Henning Kamp phk at FreeBSD.org
Tue Aug 23 10:36:04 UTC 2022


commit 5a39e0cd16e833030f39b53c22a998ec82dee698
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Aug 23 10:34:43 2022 +0000

    Free the CLI answer, also in terminal circumstances, to silence Coverity

diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index d978dcdaa..c09d0b46d 100644
--- a/bin/varnishadm/varnishadm.c
+++ b/bin/varnishadm/varnishadm.c
@@ -124,6 +124,7 @@ cli_sock(const char *T_arg, const char *S_arg)
 	if (status == CLIS_AUTH) {
 		if (S_arg == NULL) {
 			fprintf(stderr, "Authentication required\n");
+			free(answer);
 			closefd(&sock);
 			return (-1);
 		}


More information about the varnish-commit mailing list