Re: [PATCH] drivers: fix a memory leak
From: Arnd Bergmann
Date: Fri Nov 08 2019 - 09:48:03 EST
On Thu, Nov 7, 2019 at 8:37 PM <wu000273@xxxxxxx> wrote:
>
> From: Qiushi Wu <wu000273@xxxxxxx>
>
> In intel_gtt_setup_scratch_page(), "page" is not released if
> pci_dma_mapping_error() return errors. This will lead to memory leak.
> Fix this issue by freeing "page" before return.
>
> Signed-off-by: Qiushi Wu <wu000273@xxxxxxx>
Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>