git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Laszlo PappNext: Michael J Gruber
Message 2 of 4 in “Fix resource leaks in wrapper.c”
  1. Fix resource leaks in wrapper.cLaszlo Papp, Oct 27, 2009
  2. Johannes SixtOct 27, 2009
  3. Michael J GruberOct 27, 2009
  4. Michael J GruberOct 27, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.