Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit a6b7a71fba0c7cbe272dc02778a1c20665c374da
- Author: Tollef Fog Heen <tfheen@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;
Add Comment
Please, Sign In to add comment