mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
virChrdevAlloc: 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
d79a5e4e1b
commit
cb7260c7d8
@ -265,13 +265,9 @@ virChrdevs *virChrdevAlloc(void)
|
|||||||
|
|
||||||
/* there will hardly be any devices most of the time, the hash
|
/* there will hardly be any devices most of the time, the hash
|
||||||
* does not have to be huge */
|
* does not have to be huge */
|
||||||
if (!(devs->hash = virHashNew(virChrdevHashEntryFree)))
|
devs->hash = virHashNew(virChrdevHashEntryFree);
|
||||||
goto error;
|
|
||||||
|
|
||||||
return devs;
|
return devs;
|
||||||
error:
|
|
||||||
virChrdevFree(devs);
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user