From: Toon Claes <toon@iotcl.com>
To: Junio C Hamano <gitster@pobox.com>, Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] bundle-uri: plug leak in unbundle_from_file()
Date: Thu, 10 Oct 2024 11:15:12 +0200 [thread overview]
Message-ID: <875xq0s4in.fsf@iotcl.com> (raw)
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.
> 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
next prev parent reply other threads:[~2024-10-10 9:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-26 8:30 [PATCH] bundle-uri: plug leak in unbundle_from_file() Toon Claes
2024-08-26 9:51 ` Patrick Steinhardt
2024-08-26 16:06 ` Junio C Hamano
2024-10-01 18:58 ` Toon Claes
2024-10-01 19:29 ` Junio C Hamano
2024-10-10 9:15 ` Toon Claes [this message]
2024-10-10 9:12 ` [PATCH v2] " Toon Claes
2024-10-10 12:55 ` Patrick Steinhardt
2024-10-10 18:47 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875xq0s4in.fsf@iotcl.com \
--to=toon@iotcl.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).