mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +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,
|
||||
unsigned int flags)
|
||||
{
|
||||
virSecurityDeviceLabelDefPtr *seclabels;
|
||||
virSecurityDeviceLabelDefPtr *seclabels = NULL;
|
||||
size_t nseclabels = 0;
|
||||
int n;
|
||||
size_t i, j;
|
||||
|
Loading…
Reference in New Issue
Block a user