]> git.proxmox.com Git - mirror_qemu.git/commit - qga/commands-win32.c
qga-win: Fix build_guest_fsinfo() close of nonexistent
authorBasil Salman <basil@daynix.com>
Mon, 12 Jul 2021 16:15:08 +0000 (11:15 -0500)
committerMichael Roth <michael.roth@amd.com>
Tue, 3 Aug 2021 03:11:45 +0000 (22:11 -0500)
commit02ac3f4b959546ad69287aae84e2d52e21aeb479
treedd20495e918bdfe98e8ae8680879491e467fdd3a
parent3d98f9b68d2a8c10960d788027b8500ee947933f
qga-win: Fix build_guest_fsinfo() close of nonexistent

On the current error path of build_guest_fsinfo(), a non existent handle
is passed to CloseHandle().

This patch adds initialization of hLocalDiskHandle to
INVALID_HANDLE_VALUE, and checks for handle validity before the handle
is closed.

Signed-off-by: Basil Salman <basil@daynix.com>
Signed-off-by: Basil Salman <basil@redhat.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
qga/commands-win32.c