Re: [Qemu-block] [PATCH] qemu: avoid memory leak while remove disk

2018-12-17 Thread wangjian
ok, I will send the patch by git send-email. On 12/15/2018 4:22 AM, Michael S. Tsirkin wrote: On Fri, Dec 07, 2018 at 09:53:06AM +0800, wangjian wrote: Memset vhost_dev to zero in the vhost_dev_cleanup function. This causes dev.vqs to be NULL, so that vqs does not free up space when calling

[Qemu-block] [PATCH] qemu: avoid memory leak while remove disk

2018-12-06 Thread wangjian
Memset vhost_dev to zero in the vhost_dev_cleanup function. This causes dev.vqs to be NULL, so that vqs does not free up space when calling the g_free function. This will result in a memory leak. But you can't release vqs directly in the vhost_dev_cleanup function, because vhost_net will also