diff options
author | Rubén Justo <rjusto@gmail.com> | 2023-06-11 20:49:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-06-12 15:05:09 -0700 |
commit | 1533bda7700d6aa4374509f9611ae52a4eb2bcda (patch) | |
tree | b8b6e2463d8745e16236bb0b0a07afc9206467b2 /builtin/commit-graph.c | |
parent | 4689101a4042ff245a425f476c6939b3c464ebc3 (diff) |
branch: fix a leak in dwim_and_setup_tracking
In e89f151db1 (branch: move --set-upstream-to behavior to
dwim_and_setup_tracking(), 2022-01-28) the string returned by
dwim_branch_start() was not freed, resulting in a memory leak.
It can be reviewed with:
$ git remote add local .
$ git update-ref refs/remotes/local/foo HEAD
$ git branch --set-upstream-to local/foo foo
Direct leak of 23 byte(s) in 1 object(s) allocated from:
... in xstrdup wrapper.c
... in expand_ref refs.c
... in repo_dwim_ref refs.c
... in dwim_branch_start branch.c
... in dwim_and_setup_tracking branch.c
... in cmd_branch builtin/branch.c
... in run_builtin git.c
Let's free it now.
Signed-off-by: Rubén Justo <rjusto@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions