summaryrefslogtreecommitdiff
path: root/src/pathspec.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2015-01-26 11:24:47 -0600
committerEdward Thomson <ethomson@edwardthomson.com>2015-01-26 11:24:47 -0600
commitff80b5e80b814af835b68e3d881d79d3a25504b0 (patch)
tree206fa03540a5c2e49360c460352cbdf6ac4e868d /src/pathspec.c
parent9a09ed13c4b545adde4a768bd62c325d05621c36 (diff)
parentbb6aafe88f01d2902085fd78464ae277ebea0a67 (diff)
downloadlibgit2-ff80b5e80b814af835b68e3d881d79d3a25504b0.tar.gz
Merge pull request #2847 from jacquesg/coverity
More coverity fixes
Diffstat (limited to 'src/pathspec.c')
-rw-r--r--src/pathspec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pathspec.c b/src/pathspec.c
index 6aef574c8..fab6f9a76 100644
--- a/src/pathspec.c
+++ b/src/pathspec.c
@@ -318,6 +318,9 @@ static git_pathspec_match_list *pathspec_match_alloc(
m = NULL;
}
+ if (!m)
+ return NULL;
+
/* need to keep reference to pathspec and increment refcount because
* failures array stores pointers to the pattern strings of the
* pathspec that had no matches