mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Fix SEGV in tab completion of virsh commands
This commit is contained in:
parent
a0d210598f
commit
00602abe00
@ -1,3 +1,8 @@
|
||||
Tue Feb 27 10:35:35 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/virsh.c: Fix SEGV when doing tab-completion of commands
|
||||
which have no arguments (eg, nodeinfo<TAB>).
|
||||
|
||||
Tue Feb 27 10:25:35 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/virsh.c: Fix command line argument parsing to make
|
||||
|
@ -3207,6 +3207,9 @@ vshReadlineOptionsGenerator(const char *text, int state)
|
||||
if (!cmd)
|
||||
return NULL;
|
||||
|
||||
if (!cmd->opts)
|
||||
return NULL;
|
||||
|
||||
while ((name = cmd->opts[list_index].name)) {
|
||||
vshCmdOptDef *opt = &cmd->opts[list_index];
|
||||
char *res;
|
||||
|
Loading…
x
Reference in New Issue
Block a user