]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ps/leakfixes-0129'
authorJunio C Hamano <gitster@pobox.com>
Thu, 6 Feb 2025 22:56:45 +0000 (14:56 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 Feb 2025 22:56:45 +0000 (14:56 -0800)
A few more leakfixes.

* ps/leakfixes-0129:
  scalar: free result of `remote_default_branch()`
  unix-socket: fix memory leak when chdir(3p) fails

1  2 
scalar.c
unix-socket.c

diff --cc scalar.c
index f24bcd0169cee4f5055304a42954f7bf5df67e48,6c47afa4ea1fca2aff92ef8636e2a69e3e234e3f..da42b4be0cc9b6b3fd86861f37d9c8a9cf69bbcf
+++ b/scalar.c
@@@ -409,8 -408,9 +409,9 @@@ void load_builtin_commands(const char *
  static int cmd_clone(int argc, const char **argv)
  {
        const char *branch = NULL;
+       char *branch_to_free = NULL;
        int full_clone = 0, single_branch = 0, show_progress = isatty(2);
 -      int src = 1;
 +      int src = 1, tags = 1;
        struct option clone_options[] = {
                OPT_STRING('b', "branch", &branch, N_("<branch>"),
                           N_("branch to checkout after clone")),
diff --cc unix-socket.c
Simple merge