aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-05-18 14:40:15 -0700
committerJunio C Hamano <gitster@pobox.com>2016-05-18 14:40:15 -0700
commit66106691a1b71e445fe5e4d6b8b043dffc7dfe4c (patch)
tree580fee1afc5f1b54fa2525fe461630a0f6b10c1b /config.c
parent989cbd455619e1e7b6156366ee7fd5376af683b6 (diff)
parent99dab16863c2eca584a84bdde748b9c113717603 (diff)
downloadgit-66106691a1b71e445fe5e4d6b8b043dffc7dfe4c.tar.gz
git-66106691a1b71e445fe5e4d6b8b043dffc7dfe4c.tar.xz
Merge branch 'sb/misc-cleanups' into HEAD
* sb/misc-cleanups: submodule-config: don't shadow `cache` config.c: drop local variable 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 'config.c')
-rw-r--r--config.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/config.c b/config.c
index 47b2ce1d5..4c9b447d7 100644
--- a/config.c
+++ b/config.c
@@ -1309,14 +1309,11 @@ static struct config_set_element *configset_find_element(struct config_set *cs,
struct config_set_element k;
struct config_set_element *found_entry;
char *normalized_key;
- int ret;
/*
* `key` may come from the user, so normalize it before using it
* for querying entries from the hashmap.
*/
- ret = git_config_parse_key(key, &normalized_key, NULL);
-
- if (ret)
+ if (git_config_parse_key(key, &normalized_key, NULL))
return NULL;
hashmap_entry_init(&k, strhash(normalized_key));