9
0
Fork 0

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:
Sascha Hauer 2013-09-22 12:30:54 +02:00
parent 3c2df61f63
commit a0dd2f162a
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}