Commit 636af219 by Jacques Germishuys

Return early if allocating a git_pathspec_match_list failed

parent b63b3b0e
...@@ -315,6 +315,9 @@ static git_pathspec_match_list *pathspec_match_alloc( ...@@ -315,6 +315,9 @@ static git_pathspec_match_list *pathspec_match_alloc(
m = NULL; m = NULL;
} }
if (!m)
return NULL;
/* need to keep reference to pathspec and increment refcount because /* need to keep reference to pathspec and increment refcount because
* failures array stores pointers to the pattern strings of the * failures array stores pointers to the pattern strings of the
* pathspec that had no matches * pathspec that had no matches
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment