mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-03 07:45:07 +00:00
Return early if allocating a git_pathspec_match_list failed
This commit is contained in:
parent
b63b3b0e4d
commit
636af2198e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user