mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
vboxDomainScreenshot: Don't pass uninitialized 'screenData' to VIR_FREE
If one of the early checks to get screen resolution fails 'screenData' would be passed to VIR_FREE uninitialized. Unfortunately the compiler isn't able to detect this when VIR_FREE is implemented using g_clear_pointer. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com
This commit is contained in:
parent
94f26f01bd
commit
515e62b32b
@ -7418,7 +7418,7 @@ vboxDomainScreenshot(virDomainPtr dom,
|
|||||||
if (display) {
|
if (display) {
|
||||||
PRUint32 width, height, bitsPerPixel;
|
PRUint32 width, height, bitsPerPixel;
|
||||||
PRUint32 screenDataSize;
|
PRUint32 screenDataSize;
|
||||||
PRUint8 *screenData;
|
PRUint8 *screenData = NULL;
|
||||||
PRInt32 xOrigin, yOrigin;
|
PRInt32 xOrigin, yOrigin;
|
||||||
|
|
||||||
rc = gVBoxAPI.UIDisplay.GetScreenResolution(display, screen,
|
rc = gVBoxAPI.UIDisplay.GetScreenResolution(display, screen,
|
||||||
|
Loading…
Reference in New Issue
Block a user