aboutsummaryrefslogtreecommitdiff
path: root/qga/commands-win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'qga/commands-win32.c')
-rw-r--r--qga/commands-win32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 697c65507c..a1015757d8 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -935,6 +935,8 @@ static GuestDiskAddressList *build_guest_disk_info(char *guid, Error **errp)
DWORD last_err = GetLastError();
if (last_err == ERROR_MORE_DATA) {
/* Try once more with big enough buffer */
+ size = sizeof(VOLUME_DISK_EXTENTS) +
+ (sizeof(DISK_EXTENT) * (extents->NumberOfDiskExtents - 1));
g_free(extents);
extents = g_malloc0(size);
if (!DeviceIoControl(