diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-08-27 14:04:49 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-27 14:04:49 -0700 |
commit | 0d9a8e33f9fd07efa10072576df01a9cae5d89e6 (patch) | |
tree | 5a01c05bf4d8e6d775c4843e5c760e81be4a780b /submodule.c | |
parent | edab8a8d07eff5771ad08e7d2935f5df992c2c45 (diff) | |
parent | 55fe225dde455ae32b9bc963bef4aabb9f5f7c3e (diff) | |
download | git-0d9a8e33f9fd07efa10072576df01a9cae5d89e6.tar.gz |
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 'submodule.c')
-rw-r--r-- | submodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/submodule.c b/submodule.c index a52b93a87f..d0b70ca536 100644 --- a/submodule.c +++ b/submodule.c @@ -194,7 +194,7 @@ void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt, char *key; key = xstrfmt("submodule.%s.ignore", submodule->name); - if (repo_config_get_string_const(the_repository, key, &ignore)) + if (repo_config_get_string_tmp(the_repository, key, &ignore)) ignore = submodule->ignore; free(key); @@ -1299,7 +1299,7 @@ static int get_fetch_recurse_config(const struct submodule *submodule, int fetch_recurse = submodule->fetch_recurse; key = xstrfmt("submodule.%s.fetchRecurseSubmodules", submodule->name); - if (!repo_config_get_string_const(spf->r, key, &value)) { + if (!repo_config_get_string_tmp(spf->r, key, &value)) { fetch_recurse = parse_fetch_recurse_submodules_arg(key, value); } free(key); |