]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ah/plugleaks'
authorJunio C Hamano <gitster@pobox.com>
Wed, 7 Apr 2021 23:54:08 +0000 (16:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Apr 2021 23:54:08 +0000 (16:54 -0700)
Plug or annotate remaining leaks that trigger while running the
very basic set of tests.

* ah/plugleaks:
  transport: also free remote_refs in transport_disconnect()
  parse-options: don't leak alias help messages
  parse-options: convert bitfield values to use binary shift
  init-db: silence template_dir leak when converting to absolute path
  init: remove git_init_db_config() while fixing leaks
  worktree: fix leak in dwim_branch()
  clone: free or UNLEAK further pointers when finished
  reset: free instead of leaking unneeded ref
  symbolic-ref: don't leak shortened refname in check_symref()

1  2 
builtin/init-db.c
builtin/ls-remote.c
builtin/remote.c
transport.c

index f82efe4aff6dcecb4422d1cb21ae69832719124b,efc66523e22c481cf31595f9ecddcd8ddac8b4ce..c19b35f1e6919e53c85b05a4f5a85f5cec5cbe15
@@@ -212,12 -200,8 +200,9 @@@ static int create_default_files(const c
        int reinit;
        int filemode;
        struct strbuf err = STRBUF_INIT;
+       const char *init_template_dir = NULL;
 +      const char *work_tree = get_git_work_tree();
  
-       /* Just look for `init.templatedir` */
-       init_db_template_dir = NULL; /* re-set in case it was set before */
-       git_config(git_init_db_config, NULL);
        /*
         * First copy the templates -- we might have the default
         * config file there, in which case we would want to read
Simple merge
Simple merge
diff --cc transport.c
Simple merge