Skip to content
  • Zhang Min's avatar
    drive mirror:fix memory leak · 6df3bf8e
    Zhang Min authored
    
    
    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.
    
    It should use qemu_iovec_destroy() to free op->qiov.
    
    Signed-off-by: default avatarZhang Min <rudy.zhangmin@huawei.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    6df3bf8e