Thread (73 messages) flat view 73 messages, 7 authors, 2021-08-31

Re: [PATCH v2 4/6] tr2: fix memory leak & logic error in 2f732bf15e6

From: Eric Sunshine <hidden>
Date: 2021-08-26 15:58:39

On Thu, Aug 26, 2021 at 8:22 AM Ævar Arnfjörð Bjarmason
[off-list ref] wrote:
[...]
Let's move all the freeing of the memory to the end of the
function. If we're still at STRBUF_INIT with "name" due to not haven
s/haven/having/
taken the branch where the strbuf_read_file() succeeds freeing it is
redundant, so we could move it into the body of the "if", but just
handling freeing the same way for all branches of the function makes
it more readable.
[...]
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help