mirror of
https://git.proxmox.com/git/libgit2
synced 2025-07-03 06:25:33 +00:00
util: handle NULL pointers passed to git_strarray_free()
Signed-off-by: Brodie Rao <brodie@sf.io>
This commit is contained in:
parent
2ad45213a8
commit
2fcc0d07d0
@ -140,6 +140,10 @@ int git_libgit2_opts(int key, ...)
|
||||
void git_strarray_free(git_strarray *array)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (array == NULL)
|
||||
return;
|
||||
|
||||
for (i = 0; i < array->count; ++i)
|
||||
git__free(array->strings[i]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user