Fix memory leak in virsh

This commit is contained in:
Hu Tao
2010-12-22 15:12:34 +08:00
committed by Eric Blake
parent c207b6d9f9
commit 29f92d64d3

View File

@@ -10935,8 +10935,10 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser)
if (tk == VSH_TK_ERROR)
goto syntaxError;
if (tk != VSH_TK_ARG)
if (tk != VSH_TK_ARG) {
VIR_FREE(tkdata);
break;
}
if (cmd == NULL) {
/* first token must be command name */