Message ID | 20240704102617.1132337-3-hadess@hadess.net |
---|---|
State | New |
Headers | show |
Series | Fix a number of static analysis issues #5 | expand |
diff --git a/src/shared/shell.c b/src/shared/shell.c index add4fa131c7a..878be140c336 100644 --- a/src/shared/shell.c +++ b/src/shared/shell.c @@ -525,6 +525,7 @@ static int cmd_exec(const struct bt_shell_menu_entry *entry, print_text(COLOR_HIGHLIGHT, "Unable to parse mandatory command arguments: %s", man ); free(man); + wordfree(&w); return -EINVAL; } @@ -545,6 +546,7 @@ optional: print_text(COLOR_HIGHLIGHT, "Unable to parse optional command arguments: %s", opt); free(opt); + wordfree(&w); return -EINVAL; }