Re: [PATCH] Fix resource leaks in wrapper.c
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Oct 27, 2009, 07:13 UTC
- Message-ID
- <4AE69DA7.6030704@viscovery.net>
- In-Reply-To
- <1256615635-4940-1-git-send-email-djszapi@archlinux.us>
Laszlo Papp schrieb:
Show 6 quoted lines
> @@ -266,7 +266,7 @@ int odb_mkstemp(char *template, size_t limit, const char *pattern) > fd = mkstemp(template); > if (0 <= fd) > return fd; > - > + close(fd);
Sorry, where is here a resource leak? You are "closing" something that was never opened because fd is less than zero.
Ditto for the other case.
-- Hannes