mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Fix crash free'ing securityDriverNames in QEMU driver
The previous fix to avoid leaking securityDriverNames forgot to handle the case of securityDriverNames being NULL, leading to a crash Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
2349d51fbe
commit
bbc663b1c3
@ -1134,7 +1134,8 @@ qemuShutdown(void) {
|
||||
VIR_FREE(qemu_driver->saveImageFormat);
|
||||
VIR_FREE(qemu_driver->dumpImageFormat);
|
||||
|
||||
for (i = 0 ; qemu_driver->securityDriverNames[i] != NULL ; i++)
|
||||
for (i = 0 ; (qemu_driver->securityDriverNames != NULL &&
|
||||
qemu_driver->securityDriverNames[i] != NULL) ; i++)
|
||||
VIR_FREE(qemu_driver->securityDriverNames[i]);
|
||||
VIR_FREE(qemu_driver->securityDriverNames);
|
||||
virSecurityManagerFree(qemu_driver->securityManager);
|
||||
|
Loading…
x
Reference in New Issue
Block a user