bootm: fix memory leak
data->of_root_node may be allocated from of of_unflatten_dtb. Free it in this case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
3c2df61f63
commit
a0dd2f162a
|
@ -299,6 +299,8 @@ err_out:
|
|||
uimage_close(data->initrd);
|
||||
if (data->os)
|
||||
uimage_close(data->os);
|
||||
if (data->of_root_node && data->of_root_node != of_get_root_node())
|
||||
of_delete_node(data->of_root_node);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue