mirror of https://gitee.com/openkylin/libvirt.git
Fix memory leak in virsh
This commit is contained in:
parent
c207b6d9f9
commit
29f92d64d3
|
@ -10935,8 +10935,10 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser)
|
||||||
|
|
||||||
if (tk == VSH_TK_ERROR)
|
if (tk == VSH_TK_ERROR)
|
||||||
goto syntaxError;
|
goto syntaxError;
|
||||||
if (tk != VSH_TK_ARG)
|
if (tk != VSH_TK_ARG) {
|
||||||
|
VIR_FREE(tkdata);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (cmd == NULL) {
|
if (cmd == NULL) {
|
||||||
/* first token must be command name */
|
/* first token must be command name */
|
||||||
|
|
Loading…
Reference in New Issue