mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
virCapabilitiesHostNUMAUnref: Accept NULL
Fortunately, this is not causing any problems now because glib does this check for us when calling this function via attribute cleanup. But in a future commit we will explicitly call this function over a struct member that might be NULL. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
98f1f4a439
commit
599f9c73d4
@ -184,6 +184,9 @@ virCapabilitiesFreeStoragePool(virCapsStoragePoolPtr pool)
|
||||
void
|
||||
virCapabilitiesHostNUMAUnref(virCapsHostNUMAPtr caps)
|
||||
{
|
||||
if (!caps)
|
||||
return;
|
||||
|
||||
if (g_atomic_int_dec_and_test(&caps->refs)) {
|
||||
g_ptr_array_unref(caps->cells);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user