diff options
Diffstat (limited to 'src/ignore.c')
-rw-r--r-- | src/ignore.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ignore.c b/src/ignore.c index b08ff2200..f373c9482 100644 --- a/src/ignore.c +++ b/src/ignore.c @@ -32,9 +32,9 @@ static int parse_ignore_file( } while (!error && *scan) { - if (!match) { - match = git__calloc(1, sizeof(*match)); - GITERR_CHECK_ALLOC(match); + if (!match && !(match = git__calloc(1, sizeof(*match)))) { + error = -1; + break; } match->flags = GIT_ATTR_FNMATCH_ALLOWSPACE | GIT_ATTR_FNMATCH_ALLOWNEG; |