Diff between 36bf0bd0421922c6d730131cb873c7e1fe9fd898 and 37f13066b8ed17b7549f8da7a30f1ccd86803f18
Changed Files
| File | Additions | Deletions | Status |
| tools/btmgmt.c | +3 | -0 | modified |
Full Patch
diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index 84a5f1b..49459e3 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
@@ -3347,6 +3347,9 @@ static void rl_handler(char *input)
if (wordexp(input, &w, WRDE_NOCMD))
goto done;
+ if (w.we_wordc == 0)
+ goto free_we;
+
cmd = w.we_wordv[0];
argv = w.we_wordv;
argc = w.we_wordc;