diff options
Diffstat (limited to 'src/pathspec.c')
| -rw-r--r-- | src/pathspec.c | 3 |
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 |
