summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2014-02-16 16:06:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-18 23:51:29 (GMT)
commitaa012e906542dbc533dbc5bafe1c4e0a47bdc59e (patch)
tree6c68c14293f461733d3e632827ef94d31d600aa5
parent5f95c9f850b19b368c43ae399cc831b17a26a5ac (diff)
downloadgit-aa012e906542dbc533dbc5bafe1c4e0a47bdc59e.zip
git-aa012e906542dbc533dbc5bafe1c4e0a47bdc59e.tar.gz
git-aa012e906542dbc533dbc5bafe1c4e0a47bdc59e.tar.bz2
notes-utils: handle boolean notes.rewritemode correctly
If we carry on after outputting config_error_nonbool then we're guaranteed to dereference a null pointer. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--notes-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/notes-utils.c b/notes-utils.c
index 2975dcd..4aa7023 100644
--- a/notes-utils.c
+++ b/notes-utils.c
@@ -75,7 +75,7 @@ static int notes_rewrite_config(const char *k, const char *v, void *cb)
return 0;
} else if (!c->mode_from_env && !strcmp(k, "notes.rewritemode")) {
if (!v)
- config_error_nonbool(k);
+ return config_error_nonbool(k);
c->combine = parse_combine_notes_fn(v);
if (!c->combine) {
error(_("Bad notes.rewriteMode value: '%s'"), v);