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:05:49 +0000 (16:05 +0200)
commitcd24da0db9f75ca11eaf6060f0ccb90e2f3be3b0
tree6f6113d43ca1d8b9c89ca2b0052b43b61e590783
parentd420b11666434b00b0146ed266cb991f9f5aa598
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