Commit c065f6a1d2b9c7c64646a6c0e65abbb3ca0dc4b1

Edward Thomson 2016-07-14T23:04:47

apply: check allocation properly

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/patch_parse.c b/src/patch_parse.c
index 7f21e3f..ddaece6 100644
--- a/src/patch_parse.c
+++ b/src/patch_parse.c
@@ -897,7 +897,7 @@ done:
 	*out_len = (path - path_start);
 	*out = git__strndup(path_start, *out_len);
 
-	return (out == NULL) ? -1 : 0;
+	return (*out == NULL) ? -1 : 0;
 }
 
 static int check_filenames(git_patch_parsed *patch)