From c065f6a1d2b9c7c64646a6c0e65abbb3ca0dc4b1 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Thu, 14 Jul 2016 23:04:47 -0400 Subject: [PATCH] apply: check allocation properly --- src/patch_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patch_parse.c b/src/patch_parse.c index 7f21e3f8e..ddaece62c 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)