Commit 0beb7fe42726671304161a1aecee4924617b7c96

Jacques Germishuys 2014-12-24T11:44:17

Added missing error handling path

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/diff.c b/src/diff.c
index 1f3ee63..e23d389 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));