diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-13 14:12:34 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-13 14:12:34 -0700 |
commit | fc452aeac2d5d357de2904aebee8d3867f92705c (patch) | |
tree | eddb9131bf8f3abba7be345e77b61624b8106ea8 /builtin | |
parent | 5250af49f03b5f2da96770523f69d7584693b553 (diff) | |
parent | 9c60d9faab43f73166d4cebb7c86b1bbf8d8df4b (diff) | |
download | git-fc452aeac2d5d357de2904aebee8d3867f92705c.tar.gz git-fc452aeac2d5d357de2904aebee8d3867f92705c.tar.xz |
Merge branch 'sb/misc-cleanups'
Assorted minor clean-ups.
* sb/misc-cleanups:
credential-cache, send_request: close fd when done
bundle: don't leak an fd in case of early return
abbrev_sha1_in_line: don't leak memory
notes: don't leak memory in git_config_get_notes_strategy
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/notes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/notes.c b/builtin/notes.c index ed6f2222f..6fd058de9 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -744,13 +744,14 @@ static int merge_commit(struct notes_merge_options *o) static int git_config_get_notes_strategy(const char *key, enum notes_merge_strategy *strategy) { - const char *value; + char *value; - if (git_config_get_string_const(key, &value)) + if (git_config_get_string(key, &value)) return 1; if (parse_notes_merge_strategy(value, strategy)) git_die_config(key, "unknown notes merge strategy %s", value); + free(value); return 0; } |