]> xenbits.xensource.com Git - libvirt.git/commit
virsh: avoid double-free
authorJim Meyering <meyering@redhat.com>
Mon, 14 Dec 2009 13:34:29 +0000 (14:34 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 14 Dec 2009 15:26:44 +0000 (16:26 +0100)
commit21a2eba44fdbb9866e3c4db90e785eb34907e76f
tree013e3452294bfd0be46dca08f530aaec3b25f240
parentb1483189811c6980945731f54837c765d61ea5d0
virsh: avoid double-free

* tools/virsh.c (vshCommandParse): Avoid double-free of "tkdata".
Set it to NULL immediately after free in the (cmd == NULL) case,
just as in the other case, in case the final free(tkdata) is
triggered by a syntax error.
tools/virsh.c