[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-upstream-unstable] win32-aio: Fix memory leak



commit 563068a8b2e980713e056512bcd941237f6090fb
Author:     Kevin Wolf <kwolf@xxxxxxxxxx>
AuthorDate: Wed Jan 16 21:20:00 2013 +0100
Commit:     Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
CommitDate: Mon Jan 21 13:43:10 2013 -0600

    win32-aio: Fix memory leak
    
    The buffer is allocated for both reads and writes, and obviously it
    should be freed even if an error occurs.
    
    Cc: qemu-stable@xxxxxxxxxx
    Signed-off-by: Kevin Wolf <kwolf@xxxxxxxxxx>
    Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
    (cherry picked from commit e8bccad5ac6095b5af7946cd72d9aacb57f7c0a3)
    
    Conflicts:
    
        block/win32-aio.c
    
    *addressed conflict due to buggy g_free() still in use instead of
    qemu_vfree() as it is upstream (via commit 7479acdb)
    
    Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
---
 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 6b02707..9b79633 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);
         }
+        qemu_vfree(waiocb->buf);
     }
 
 
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.