From: Toon Claes Date: Thu, 10 Oct 2024 09:15:12 GMT Subject: Re: [PATCH] bundle-uri: plug leak in unbundle_from_file() Message-ID: <875xq0s4in.fsf@iotcl.com> In-Reply-To: Junio C Hamano 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