virtio-blk: Fix memory leak among suspend/resume procedure
authorXie Yongji <xieyongji@bytedance.com>
Mon, 17 May 2021 08:43:32 +0000 (16:43 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:17:53 +0000 (16:17 +0200)
commit863da837964c80c72e368a4f748c30d25daa1815
tree2c458c77cfa09dd263c2860a881a94ef4c04102f
parent7cb9b41b5d445bf97ad13c0b78ea816e426c86aa
virtio-blk: Fix memory leak among suspend/resume procedure

[ Upstream commit b71ba22e7c6c6b279c66f53ee7818709774efa1f ]

The vblk->vqs should be freed before we call init_vqs()
in virtblk_restore().

Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Link: https://lore.kernel.org/r/20210517084332.280-1-xieyongji@bytedance.com
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/virtio_blk.c