mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -265,13 +265,9 @@ virChrdevs *virChrdevAlloc(void)
|
||||
|
||||
/* there will hardly be any devices most of the time, the hash
|
||||
* does not have to be huge */
|
||||
if (!(devs->hash = virHashNew(virChrdevHashEntryFree)))
|
||||
goto error;
|
||||
devs->hash = virHashNew(virChrdevHashEntryFree);
|
||||
|
||||
return devs;
|
||||
error:
|
||||
virChrdevFree(devs);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user