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