sof-ctl: fix segfault when no ctl name given

If no control name is passed to sof-ctl, it currently pops an error,
dumps the usage and then segfaults:

root@gr-mrb:~# sof-ctl -D hw:0
Error: No control was requested.
Usage:   ...
Segmentation fault (core dumped)

Fix all that by jumping to the right label.

Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
This commit is contained in:
Dragos Tarcatu 2019-09-02 16:37:54 +03:00 committed by Tomasz Lauda
parent 008285ea03
commit 90873c5d35
1 changed files with 1 additions and 1 deletions

View File

@ -544,7 +544,7 @@ int main(int argc, char *argv[])
if (!ctl_data->cname) { if (!ctl_data->cname) {
fprintf(stderr, "Error: No control was requested.\n"); fprintf(stderr, "Error: No control was requested.\n");
usage(argv[0]); usage(argv[0]);
goto data_free; goto struct_free;
} }