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

Re: [PATCH] Fix memory leak in "connect.c".

From
Junio C Hamano <junkio@cox.net>
Date
Sep 7, 2006, 04:09 UTC
Message-ID
<7vwt8g48rt.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060907055952.dafffe2b.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
> sq_quote allocates some memory that should be freed.

That's technically correct, but the code you are touching is immediately before exec() or die() so I chose to be sloppy and short ;-).

With sq_quote_buf() (which was introduced with 77d604 Oct 10 2005), you should be able to directly write into the command[] buffer, I think. The code you touched predates that function (b10d0e July 8 2005).

Previous: Christian CouderNext: Christian Couder
Message 2 of 6 in “Fix memory leak in "connect.c".”
  1. Fix memory leak in "connect.c".Christian Couder, Sep 7, 2006
  2. Junio C HamanoSep 7, 2006
  3. 0/2 Command preparation cleanup in "connect.c" (was: [PATCH] Fix memory leak in "connect.c".)Christian Couder, Sep 11, 2006
  4. 1/2 Move add_to_string to "quote.c" and make it extern.Christian Couder, Sep 11, 2006
  5. 2/2 Fix a memory leak in "connect.c" and die if command too long.Christian Couder, Sep 11, 2006
  6. Junio C HamanoSep 11, 2006

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.