Re: [PATCH 1/2] of: fdt: fix memory leak in fdt_ensure_space

2024-02-01 Thread Stefan Kerkmann
Hello Ahmad, On 31.01.24 18:15, Ahmad Fatoum wrote: Hello Stefan, On 31.01.24 17:56, Stefan Kerkmann wrote: If the reallocation failed the old memory remains allocated and is never freed, this is fixed by freeing the old memory on error. Signed-off-by: Stefan Kerkmann --- drivers/of/fdt.c

Re: [PATCH 1/2] of: fdt: fix memory leak in fdt_ensure_space

2024-01-31 Thread Ahmad Fatoum
Hello Stefan, On 31.01.24 17:56, Stefan Kerkmann wrote: > If the reallocation failed the old memory remains allocated and is never > freed, this is fixed by freeing the old memory on error. > > Signed-off-by: Stefan Kerkmann > --- > drivers/of/fdt.c | 27 --- > 1 file ch

[PATCH 1/2] of: fdt: fix memory leak in fdt_ensure_space

2024-01-31 Thread Stefan Kerkmann
If the reallocation failed the old memory remains allocated and is never freed, this is fixed by freeing the old memory on error. Signed-off-by: Stefan Kerkmann --- drivers/of/fdt.c | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/drivers/of/fdt.c