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

Re: [PATCH] bundle-uri: plug leak in unbundle_from_file()

From
Toon Claes <toon@iotcl.com>
Date
Oct 10, 2024, 09:15 UTC
Message-ID
<875xq0s4in.fsf@iotcl.com>
In-Reply-To
<xmqqle0jmfpf.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> Both of two callers of unbundle_from_file() are used as the
> condition of an if() statement, so unbundle() that signals an error
> with -1 wouldn't be a problem, I would think.
Show 7 quoted lines
> It may not be a bad idea as a #leftoverbits item, after the dust
> settles, to clean up the calling convention in this file (may not be
> limited to the code path that reaches this function) to follow the
> usual "signal success with 0, failures are signalled with a negative
> value".  Then we can just return the value we got from a failing
> read_bundle_header(), just the same way we return the value we got
> from a failing unbundle().

I just submitted v2 which preserves the original return values as before. I'll leave changing any return value to a #leftoverbits series to addresses them together.

-- Toon

Previous: Junio C HamanoNext: Toon Claes
Message 6 of 9 in “bundle-uri: plug leak in unbundle_from_file()”
  1. bundle-uri: plug leak in unbundle_from_file()Toon Claes, Aug 26, 2024
  2. Patrick SteinhardtAug 26, 2024
  3. Junio C HamanoAug 26, 2024
  4. Toon ClaesOct 1, 2024
  5. Junio C HamanoOct 1, 2024
  6. Toon ClaesOct 10, 2024
  7. bundle-uri: plug leak in unbundle_from_file()Toon Claes, Oct 10, 2024
  8. Patrick SteinhardtOct 10, 2024
  9. Junio C HamanoOct 10, 2024

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.