Guest User

Untitled

a guest
Jan 22nd, 2018
564
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. commit a6b7a71fba0c7cbe272dc02778a1c20665c374da
  2. Author: Tollef Fog Heen <tfheen@varnish-software.com>
  3. Date: Tue Sep 6 13:49:59 2011 +0200
  4.  
  5. Unlink -s file with autogenerated names
  6.  
  7. If just -s file or -s file,/path/to/directory is given, the file
  8. stevedore will generate a name. Make sure to unlink this to not leak
  9. disk space over time.
  10.  
  11. Fixes: #1008
  12.  
  13. diff --git a/bin/varnishd/stevedore_utils.c b/bin/varnishd/stevedore_utils.c
  14. index a38588d..bd4e368 100644
  15. --- a/bin/varnishd/stevedore_utils.c
  16. +++ b/bin/varnishd/stevedore_utils.c
  17. @@ -108,6 +108,7 @@ STV_GetFile(const char *fn, int *fdp, const char **fnp, const char *ctx)
  18. if (fd < 0)
  19. ARGV_ERR("(%s) \"%s\" mkstemp(%s) failed (%s)\n",
  20. ctx, fn, buf, strerror(errno));
  21. + AZ(unlink(buf));
  22. *fnp = strdup(buf);
  23. AN(*fnp);
  24. retval = 2;
Add Comment
Please, Sign In to add comment