[experimental-ims] daa446e Unlink -s file with autogenerated names
Geoff Simmons
geoff at varnish-cache.org
Mon Jan 9 21:51:45 CET 2012
commit daa446eb29a1d90b452dc8ccf31bf28b6c4c516b
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date: Tue Sep 6 13:49:59 2011 +0200
Unlink -s file with autogenerated names
If just -s file or -s file,/path/to/directory is given, the file
stevedore will generate a name. Make sure to unlink this to not leak
disk space over time.
Fixes: #1008
diff --git a/bin/varnishd/stevedore_utils.c b/bin/varnishd/stevedore_utils.c
index a38588d..bd4e368 100644
--- a/bin/varnishd/stevedore_utils.c
+++ b/bin/varnishd/stevedore_utils.c
@@ -108,6 +108,7 @@ STV_GetFile(const char *fn, int *fdp, const char **fnp, const char *ctx)
if (fd < 0)
ARGV_ERR("(%s) \"%s\" mkstemp(%s) failed (%s)\n",
ctx, fn, buf, strerror(errno));
+ AZ(unlink(buf));
*fnp = strdup(buf);
AN(*fnp);
retval = 2;
More information about the varnish-commit
mailing list