[master] 5e3eb0a Remove some old dead code and a inconsequential resource leak spotted by Coverity.
Poul-Henning Kamp
phk at FreeBSD.org
Thu Apr 30 13:24:04 CEST 2015
commit 5e3eb0af4799bd516b8c9b8b649ef2b2b41d4150
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Apr 30 11:23:39 2015 +0000
Remove some old dead code and a inconsequential resource leak
spotted by Coverity.
diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index 93ddf4e..6cb3d79 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -1331,7 +1331,7 @@ int
http_process(struct vtclog *vl, const char *spec, int sock, int *sfd)
{
struct http *hp;
- char *s, *q;
+ char *s;
int retval;
(void)sfd;
@@ -1350,10 +1350,9 @@ http_process(struct vtclog *vl, const char *spec, int sock, int *sfd)
AN(hp->vsb);
s = strdup(spec);
- q = strchr(s, '\0');
- assert(q > s);
AN(s);
parse_string(s, http_cmds, hp, vl);
+ free(s);
retval = hp->fd;
VSB_delete(hp->vsb);
free(hp->rxbuf);
More information about the varnish-commit
mailing list