[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 2/2] win32-aio: Fix memory leak
From: |
Kevin Wolf |
Subject: |
[Qemu-stable] [PATCH 2/2] win32-aio: Fix memory leak |
Date: |
Wed, 16 Jan 2013 21:20:00 +0100 |
The buffer is allocated for both reads and writes, and obviously it
should be freed even if an error occurs.
Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
---
block/win32-aio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block/win32-aio.c b/block/win32-aio.c
index 53b82e6..546a60d 100644
--- a/block/win32-aio.c
+++ b/block/win32-aio.c
@@ -87,8 +87,8 @@ static void win32_aio_process_completion(QEMUWin32AIOState *s,
memcpy(qiov->iov[i].iov_base, p, qiov->iov[i].iov_len);
p += qiov->iov[i].iov_len;
}
- g_free(waiocb->buf);
}
+ g_free(waiocb->buf);
}
--
1.7.6.5