Tell the user what device tree node we're looking for. Signed-off-by: Roland Hieber <r.hieber@xxxxxxxxxxxxxx> --- v1 -> v2: prevent use-after-free of key_path --- common/image-fit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index 6cbf23250d..dfd1fa02c9 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -289,11 +289,12 @@ static int fit_check_rsa_signature(struct device_node *sig_node, } key_path = xasprintf("/signature/key-%s", key_name); key_node = of_find_node_by_path(key_path); - free(key_path); if (!key_node) { - pr_info("failed to find key node\n"); + pr_info("failed to find key node %s\n", key_path); + free(key_path); return -ENOENT; } + free(key_path); ret = rsa_of_read_key(key_node, &key); if (ret) { -- 2.18.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox