Added missing error handling path

This commit is contained in:
Jacques Germishuys 2014-12-24 11:44:17 +02:00
parent 3dbd9a0e86
commit 0beb7fe427

View File

@ -1555,6 +1555,7 @@ int git_diff_format_email(
if ((offset = (loc - opts->summary)) == 0) { if ((offset = (loc - opts->summary)) == 0) {
giterr_set(GITERR_INVALID, "summary is empty"); giterr_set(GITERR_INVALID, "summary is empty");
error = -1; error = -1;
goto on_error;
} }
summary = git__calloc(offset + 1, sizeof(char)); summary = git__calloc(offset + 1, sizeof(char));