[PATCH] fixup! commands: devlookup: add support for cdev aliases
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Apr 24 22:48:39 PDT 2025
commands: devlookup: fix memory leak in error case
There's a string_list_free after out:, which we are skipping when we
directly return.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
commands/devlookup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/commands/devlookup.c b/commands/devlookup.c
index 5877d5f1b82c..b7fd7be3b624 100644
--- a/commands/devlookup.c
+++ b/commands/devlookup.c
@@ -59,7 +59,8 @@ static int do_devlookup(int argc, char *argv[])
aliasbuf = string_list_join(&sl, " ");
if (string_list_count(&sl) > 1 && (kernelopt || paramname)) {
printf("Option not supported for multi cdev alias\n");
- return COMMAND_ERROR;
+ ret = COMMAND_ERROR;
+ goto out;
}
if (alias) {
--
2.39.5
More information about the barebox
mailing list