[master] a16c070 Add a missing but inconsequential free(3).
Poul-Henning Kamp
phk at FreeBSD.org
Mon Jan 13 22:49:18 CET 2014
commit a16c0707b59e1cef8aa69245f950debb350ee20b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Jan 13 20:58:47 2014 +0000
Add a missing but inconsequential free(3).
Spotted by: Coverity
diff --git a/bin/varnishd/mgt/mgt_param_tcp.c b/bin/varnishd/mgt/mgt_param_tcp.c
index 66d10ab..8c639b3 100644
--- a/bin/varnishd/mgt/mgt_param_tcp.c
+++ b/bin/varnishd/mgt/mgt_param_tcp.c
@@ -35,6 +35,7 @@
#include "config.h"
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -96,7 +97,7 @@ static void
tcp_keep_probes(void)
{
int i, s;
- struct vss_addr **ta;
+ struct vss_addr **ta = NULL;
/* Probe a dummy socket for default values */
@@ -112,6 +113,7 @@ tcp_keep_probes(void)
tcp_probe(s, TCP_KEEPCNT, "tcp_keepalive_probes", 5);
tcp_probe(s, TCP_KEEPINTVL, "tcp_keepalive_intvl", 5);
AZ(close(s));
+ free(ta);
}
#endif
More information about the varnish-commit
mailing list