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

2020-12-22 Thread Thiago Jung Bauermann
Lakshmi Ramasubramanian 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

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

2020-12-19 Thread Lakshmi Ramasubramanian
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()