Thread (1 message) 1 message, 1 author, 2022-02-16

Re: [PATCH v2 1/4] xdiff: fix a memory leak

From: Junio C Hamano <hidden>
Date: 2022-02-16 16:55:35

Ævar Arnfjörð Bjarmason [off-list ref] writes:
quoted
They are not dealing with it because they do not initialize it - it is
an "out" parameter that is used to return data to the caller. This
patch changes the logic to "whoever initializes it is responsible for
freeing it if there is an error". By doing that we localize the error
handling to xdl_do_diff() and can leave the callers unchanged.
Yes, I'm saying that we're needlessly piling on complexity by continuing
with this pattern in the xdiff/ codebase. I think it's fair to question
the direction in general.
It is perfectly OK to question, but I'd prefer to see local
consistency.

Thanks.

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