• C
    Fix crash in virsh after bogus command · 3ebbc241
    Chris Lalancette 提交于
    If you ran virsh in interactive mode and ran a command
    that virsh could not parse, it would then SEGV
    on subsequent commands.  The problem is that we are
    freeing the vshCmd structure in the syntaxError label
    at the end of vshCommandParse, but forgetting to
    set ctl->cmd to NULL.  This means that on the next command,
    we would try to free the same structure again, leading
    to badness.
    
    * tools/virsh.c: Make sure to set ctl->cmd to NULL after
      freeing it in vshCommandParse()
    3ebbc241
virsh.c 253.2 KB