Re: [PATCH v3] vfio: Clear the caps->buf to NULL after free

Alex Williamson
2022-06-30T19:52:47Z

On Wed, 29 Jun 2022 10:29:48 +0800
Schspa Shi <schspa@gmail.com> wrote:

> On buffer resize failure, vfio_info_cap_add() will free the buffer,
> report zero for the size, and return -ENOMEM. As additional
> hardening, also clear the buffer pointer to prevent any chance of a
> double free.
>
> Signed-off-by: Schspa Shi <schspa@gmail.com>
>

Applied to vfio next branch for v5.20. Thanks,

Alex