mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
virHashAtomicNew: virHashNew
cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
d2a57b4d68
commit
8b04af42da
@ -102,10 +102,7 @@ virHashAtomicNew(virHashDataFree dataFree)
|
|||||||
if (!(hash = virObjectLockableNew(virHashAtomicClass)))
|
if (!(hash = virObjectLockableNew(virHashAtomicClass)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!(hash->hash = virHashNew(dataFree))) {
|
hash->hash = virHashNew(dataFree);
|
||||||
virObjectUnref(hash);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user