mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
Fix crash on OOM when parsing disk security label
If an OOM error occurs in virSecurityDeviceLabelDefParseXML the cleanup code may free an uninitialized pointer, causing a crash Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
e9f5f2e749
commit
a50de5d827
@ -4507,7 +4507,7 @@ virSecurityDeviceLabelDefParseXML(virSecurityDeviceLabelDefPtr **seclabels_rtn,
|
|||||||
int nvmSeclabels, xmlXPathContextPtr ctxt,
|
int nvmSeclabels, xmlXPathContextPtr ctxt,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virSecurityDeviceLabelDefPtr *seclabels;
|
virSecurityDeviceLabelDefPtr *seclabels = NULL;
|
||||||
size_t nseclabels = 0;
|
size_t nseclabels = 0;
|
||||||
int n;
|
int n;
|
||||||
size_t i, j;
|
size_t i, j;
|
||||||
|
Loading…
Reference in New Issue
Block a user