mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
virNWFilterDHCPSnoopInit: 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
420f5204cf
commit
00d34a085c
@ -1998,27 +1998,10 @@ virNWFilterDHCPSnoopInit(void)
|
|||||||
virNWFilterSnoopState.snoopReqs =
|
virNWFilterSnoopState.snoopReqs =
|
||||||
virHashNew(virNWFilterSnoopReqRelease);
|
virHashNew(virNWFilterSnoopReqRelease);
|
||||||
|
|
||||||
if (!virNWFilterSnoopState.ifnameToKey ||
|
|
||||||
!virNWFilterSnoopState.snoopReqs ||
|
|
||||||
!virNWFilterSnoopState.active)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
virNWFilterSnoopLeaseFileLoad();
|
virNWFilterSnoopLeaseFileLoad();
|
||||||
virNWFilterSnoopLeaseFileOpen();
|
virNWFilterSnoopLeaseFileOpen();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
|
||||||
virHashFree(virNWFilterSnoopState.ifnameToKey);
|
|
||||||
virNWFilterSnoopState.ifnameToKey = NULL;
|
|
||||||
|
|
||||||
virHashFree(virNWFilterSnoopState.snoopReqs);
|
|
||||||
virNWFilterSnoopState.snoopReqs = NULL;
|
|
||||||
|
|
||||||
virHashFree(virNWFilterSnoopState.active);
|
|
||||||
virNWFilterSnoopState.active = NULL;
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user