提交 00602abe 编写于 作者: D Daniel P. Berrange

Fix SEGV in tab completion of virsh commands

上级 a0d21059
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册