diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-08-27 23:04:49 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-27 23:04:49 +0200 |
commit | 0d9a8e33f9fd07efa10072576df01a9cae5d89e6 (patch) | |
tree | 5a01c05bf4d8e6d775c4843e5c760e81be4a780b /connect.c | |
parent | Merge branch 'en/mem-pool' (diff) | |
parent | submodule--helper: fix leak of core.worktree value (diff) | |
download | git-0d9a8e33f9fd07efa10072576df01a9cae5d89e6.tar.xz git-0d9a8e33f9fd07efa10072576df01a9cae5d89e6.zip |
Merge branch 'jk/leakfix'
Code clean-up.
* jk/leakfix:
submodule--helper: fix leak of core.worktree value
config: fix leak in git_config_get_expiry_in_days()
config: drop git_config_get_string_const()
config: fix leaks from git_config_get_string_const()
checkout: fix leak of non-existent branch names
submodule--helper: use strbuf_release() to free strbufs
clear_pattern_list(): clear embedded hashmaps
Diffstat (limited to 'connect.c')
-rw-r--r-- | connect.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1052,7 +1052,7 @@ static const char *get_ssh_command(void) if ((ssh = getenv("GIT_SSH_COMMAND"))) return ssh; - if (!git_config_get_string_const("core.sshcommand", &ssh)) + if (!git_config_get_string_tmp("core.sshcommand", &ssh)) return ssh; return NULL; @@ -1071,7 +1071,7 @@ static void override_ssh_variant(enum ssh_variant *ssh_variant) { const char *variant = getenv("GIT_SSH_VARIANT"); - if (!variant && git_config_get_string_const("ssh.variant", &variant)) + if (!variant && git_config_get_string_tmp("ssh.variant", &variant)) return; if (!strcmp(variant, "auto")) |