mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 15:10:02 +00:00
git_odb_object_free: don't segfault w/ arg == NULL
This commit is contained in:
parent
4bc1a30f13
commit
edca6c8fed
@ -107,6 +107,9 @@ git_otype git_odb_object_type(git_odb_object *object)
|
|||||||
|
|
||||||
void git_odb_object_free(git_odb_object *object)
|
void git_odb_object_free(git_odb_object *object)
|
||||||
{
|
{
|
||||||
|
if (object == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
git_cached_obj_decref((git_cached_obj *)object, &free_odb_object);
|
git_cached_obj_decref((git_cached_obj *)object, &free_odb_object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user