Re: [PATCH] block/virtio-blk: Fix memory leak from virtio_blk_zone_report

2024-04-09 Thread Michael Tokarev
04.04.2024 15:00, Zheyu Ma wrote: This modification ensures that in scenarios where the buffer size is insufficient for a zone report, the function will now properly set an error status and proceed to a cleanup label, instead of merely returning. The following ASAN log reveals it:

Re: [PATCH] block/virtio-blk: Fix memory leak from virtio_blk_zone_report

2024-04-04 Thread Stefan Hajnoczi
On Thu, Apr 04, 2024 at 02:00:40PM +0200, Zheyu Ma wrote: > This modification ensures that in scenarios where the buffer size is > insufficient for a zone report, the function will now properly set an > error status and proceed to a cleanup label, instead of merely > returning. > > The following

[PATCH] block/virtio-blk: Fix memory leak from virtio_blk_zone_report

2024-04-04 Thread Zheyu Ma
This modification ensures that in scenarios where the buffer size is insufficient for a zone report, the function will now properly set an error status and proceed to a cleanup label, instead of merely returning. The following ASAN log reveals it: ==1767400==ERROR: LeakSanitizer: detected memory