Re: [Qemu-devel] [PATCH] drive-mirror:fix memory leak

2014-01-22 Thread Kevin Wolf
Am 22.01.2014 um 08:56 hat Zhang Min geschrieben: > In the function mirror_iteration() -> qemu_iovec_init(), > it allocates memory for op->qiov.iov, when the write request calls back, > but in the function mirror_iteration_done(), it only frees the op, > not free the op->qiov.iov, so this causes me

Re: [Qemu-devel] [PATCH] drive-mirror:fix memory leak

2014-01-22 Thread Fam Zheng
On Wed, 01/22 15:56, Zhang Min wrote: > In the function mirror_iteration() -> qemu_iovec_init(), > it allocates memory for op->qiov.iov, when the write request calls back, > but in the function mirror_iteration_done(), it only frees the op, > not free the op->qiov.iov, so this causes memory leak. >

[Qemu-devel] [PATCH] drive-mirror:fix memory leak

2014-01-21 Thread Zhang Min
In the function mirror_iteration() -> qemu_iovec_init(), it allocates memory for op->qiov.iov, when the write request calls back, but in the function mirror_iteration_done(), it only frees the op, not free the op->qiov.iov, so this causes memory leak. Signed-off-by: Zhang Min --- block/mirror.c