diff options
| author | Vicent Marti <vicent@github.com> | 2014-04-22 11:04:35 +0200 |
|---|---|---|
| committer | Vicent Marti <vicent@github.com> | 2014-04-22 11:04:35 +0200 |
| commit | dac95e4aa33a21c2180566558726e1a3d5c0399a (patch) | |
| tree | c16c8a49bb7dff250eb009fdae7b1c8b23237130 /src/ignore.c | |
| parent | 2e609e2931b107e87b06d22fdcd21f337ab73155 (diff) | |
| parent | 17ef678ca543d8b56035e36039ee319c12d0d249 (diff) | |
| download | libgit2-dac95e4aa33a21c2180566558726e1a3d5c0399a.tar.gz | |
Merge pull request #2287 from libgit2/rb/moar-coverity-fixes
Fix some issues from the last Coverity scan
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; |
