[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] block: Fix leak of BdrvIoctlCompletionData when dri
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH] block: Fix leak of BdrvIoctlCompletionData when driver returns NULL |
Date: |
Tue, 31 May 2016 16:34:55 +0800 |
"data" allocated in bdrv_co_do_ioctl is not freed. Free it before
returning.
Cc: address@hidden
Reported-by: Kevin Wolf <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
---
block/io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/io.c b/block/io.c
index 2d832aa..aa5a5d7 100644
--- a/block/io.c
+++ b/block/io.c
@@ -2320,6 +2320,7 @@ static void bdrv_ioctl_bh_cb(void *opaque)
bdrv_co_io_em_complete(data->co, -ENOTSUP);
qemu_bh_delete(data->bh);
+ g_free(data);
}
static int bdrv_co_do_ioctl(BlockDriverState *bs, int req, void *buf)
--
2.8.3
- [Qemu-devel] [PATCH] block: Fix leak of BdrvIoctlCompletionData when driver returns NULL,
Fam Zheng <=