summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/diff.c b/src/diff.c
index 1f3ee63be..e23d3891f 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1555,6 +1555,7 @@ int git_diff_format_email(
if ((offset = (loc - opts->summary)) == 0) {
giterr_set(GITERR_INVALID, "summary is empty");
error = -1;
+ goto on_error;
}
summary = git__calloc(offset + 1, sizeof(char));