r663 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Sat Aug 5 14:23:09 CEST 2006
Author: phk
Date: 2006-08-05 14:23:09 +0200 (Sat, 05 Aug 2006)
New Revision: 663
Modified:
trunk/varnish-cache/bin/varnishd/common_cli.c
Log:
Remove unused include
free buffer on error.
Modified: trunk/varnish-cache/bin/varnishd/common_cli.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/common_cli.c 2006-08-05 12:22:46 UTC (rev 662)
+++ trunk/varnish-cache/bin/varnishd/common_cli.c 2006-08-05 12:23:09 UTC (rev 663)
@@ -21,7 +21,6 @@
#include "cli.h"
#include "cli_priv.h"
#include "common_cli.h"
-#include "libvarnish.h"
void
cli_out(struct cli *cli, const char *fmt, ...)
@@ -93,8 +92,10 @@
p = malloc(v + 1);
assert(p != NULL);
i = read(fd, p, v + 1);
- if (i < 0)
+ if (i < 0) {
+ free(p);
return (i);
+ }
assert(i == v + 1);
assert(p[v] == '\n');
p[v] = '\0';
More information about the varnish-commit
mailing list