Re: [PATCH v13 5/6] arm64: Free DTB buffer if fdt_open_into() fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lakshmi Ramasubramanian <nramas@xxxxxxxxxxxxxxxxxxx> writes:

> create_dtb() function allocates memory for the device tree blob (DTB)
> and calls fdt_open_into(). If this call fails the memory allocated
> for the DTB is not freed before returning from create_dtb() thereby
> leaking memory.
>
> Call vfree() to free the memory allocated for the DTB if fdt_open_into()
> fails.
>
> Co-developed-by: Prakhar Srivastava <prsriva@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Prakhar Srivastava <prsriva@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Lakshmi Ramasubramanian <nramas@xxxxxxxxxxxxxxxxxxx>
> ---
>  arch/arm64/kernel/machine_kexec_file.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Thiago Jung Bauermann <bauerman@xxxxxxxxxxxxx>

-- 
Thiago Jung Bauermann
IBM Linux Technology Center



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux