On Tue, Sep 27, 2016 at 07:45:24AM +0200, Ulrich Ölmann wrote:
> Whenever of_unflatten_dtb() encountered an error it already released the
> memory
> before returning the error code. Make this apparent by setting the pointer to
> NULL to avoid an erroneus free.
>
> Signed-off-by: Ulrich Ölmann <[email protected]>
> ---
> common/blspec.c | 1 +
> 1 file changed, 1 insertion(+)
Applied, thanks
Sascha
>
> diff --git a/common/blspec.c b/common/blspec.c
> index 66decb161ebd..c205d481c911 100644
> --- a/common/blspec.c
> +++ b/common/blspec.c
> @@ -399,6 +399,7 @@ static bool entry_is_of_compatible(struct blspec_entry
> *entry)
> root = of_unflatten_dtb(fdt);
> if (IS_ERR(root)) {
> ret = PTR_ERR(root);
> + root = NULL;
> goto out;
> }
>
> --
> 2.9.3
>
>
> _______________________________________________
> barebox mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/barebox
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox