Thread (45 messages) 45 messages, 2 authors, 2023-06-17

Re: [PATCH 02/11] config: fix a leak in git_config_copy_or_rename_section_in_file

From: Jeff King <hidden>
Date: 2023-06-12 03:14:39

On Sun, Jun 11, 2023 at 08:49:28PM +0200, Rubén Justo wrote:
In 52d59cc645 (branch: add a --copy (-c) option to go with --move (-m),
2017-06-18) a new strbuf variable was introduced, but not released.

Thus, when copying a branch that has any configuration, we have a
leak.

   $ git branch foo
   $ git config branch.foo.some-key some_value
   $ git branch -c foo bar
Looks good. Thanks for digging up the commit which introduced the
problem. I always find that gives me more confidence that the leak is
just a simple "oops, we forgot to free", and there isn't something more
subtle going on.

-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