Thread (82 messages) flat view 82 messages, 11 authors, 2021-09-23

Re: [PATCH v2 3/4] SANITIZE tests: fix memory leaks in t5701*, add to whitelist

From: Jeff King <hidden>
Date: 2021-07-15 21:43:45

On Wed, Jul 14, 2021 at 07:23:53PM +0200, Ævar Arnfjörð Bjarmason wrote:
Fix a memory leak in a2ba162cda (object-info: support for retrieving
object info, 2021-04-20) which appears to have been based on a
misunderstanding of how the pkt-line.c API works, there is no need to
strdup() input to, it's just a printf()-like format function.

This fixes a potentially large memory leak, since the number of OID
lines the "object-info" call can be arbitrarily large (or a small one
if the request is small).
Very nice. This will also be much more efficient, since we get to reuse
the same buffer in each run through the loop.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help