Return early if allocating a git_pathspec_match_list failed

This commit is contained in:
Jacques Germishuys 2015-01-25 14:38:10 +02:00
parent b63b3b0e4d
commit 636af2198e

View File

@ -315,6 +315,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