Commit ca9bbcb5 by Etienne Samson

blame: check error code when loading the mailmap

Reported by Coverity, CID 1393484
parent f4633791
......@@ -133,8 +133,11 @@ git_blame* git_blame__alloc(
return NULL;
}
if (opts.flags & GIT_BLAME_USE_MAILMAP)
git_mailmap_from_repository(&gbr->mailmap, repo);
if (opts.flags & GIT_BLAME_USE_MAILMAP &&
git_mailmap_from_repository(&gbr->mailmap, repo) < 0) {
git_blame_free(gbr);
return NULL;
}
return gbr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment