[PATCH] blspec: fix erroneus free in entry_is_of_compatible()
Ulrich Ölmann
u.oelmann at pengutronix.de
Mon Sep 26 22:45:24 PDT 2016
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 <u.oelmann at pengutronix.de>
---
common/blspec.c | 1 +
1 file changed, 1 insertion(+)
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
More information about the barebox
mailing list