From: Ian Jackson Date: Fri, 4 Sep 2009 15:12:28 +0000 (+0100) Subject: fix qemu memory leak in block interface X-Git-Tag: xen-4.0.0-rc1~41 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9c58cf9321f746b223bdd778c49c31ff756b6b1b;p=qemu-xen-4.5-testing.git fix qemu memory leak in block interface the qemu block interface leaks memory every time a read or write request is issued, this patch fixes it. This is also the bug that is causing stubdomains to crash under high disk IO. Signed-off-by: Stefano Stabellini --- diff --git a/block.c b/block.c index 36f5eb919..6ce453c76 100644 --- a/block.c +++ b/block.c @@ -1378,6 +1378,7 @@ static void bdrv_aio_rw_vector_cb(void *opaque, int ret) qemu_vfree(s->bounce); s->this_aiocb->cb(s->this_aiocb->opaque, ret); qemu_aio_release(s->this_aiocb); + qemu_free(s); } static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs,