[master] 69a521d Fix previous fix.

Poul-Henning Kamp phk at varnish-cache.org
Tue Oct 1 17:02:39 CEST 2013


commit 69a521d11683a8d59437b3755813127c94551c49
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Oct 1 15:01:51 2013 +0000

    Fix previous fix.

diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index 8cb80fb..2349702 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -720,9 +720,11 @@ http_tx_parse_args(char * const *av, struct vtclog *vl, struct http *hp,
 	if (body != NULL && !nolen)
 		VSB_printf(hp->vsb, "Content-Length: %d%s", bodylen, nl);
 	VSB_cat(hp->vsb, nl);
-	if (body != NULL)
+	if (body != NULL) {
 		VSB_bcat(hp->vsb, body, bodylen);
-	return av;
+		free(body);
+	}
+	return (av);
 }
 
 /**********************************************************************
@@ -768,7 +770,6 @@ cmd_http_txresp(CMD_ARGS)
 	REPLACE(body, "");
 
 	av = http_tx_parse_args(av, vl, hp, body);
-	free(body);
 	if (*av != NULL)
 		vtc_log(hp->vl, 0, "Unknown http txresp spec: %s\n", *av);
 



More information about the varnish-commit mailing list