]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
snapshot: avoid virsh crash with older servers
authorEric Blake <eblake@redhat.com>
Fri, 8 Jun 2012 03:46:47 +0000 (21:46 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 11 Jun 2012 14:22:03 +0000 (08:22 -0600)
commitd9f606659829e666803d95d05aee9ca1ecced955
tree95f3fff017e2b132047f1823a0eacac98dfec254
parentd41d252694c0a3f896a3442e19869fc8ec00eeb2
snapshot: avoid virsh crash with older servers

Commits 5108230116d7b39, and 521cc447 introduced support for
'virsh snapshot-list --from' when talking to a server older than
0.9.5, but broke support for plain 'virsh snapshot-list' for the
same old server in the process.  Because the code is not properly
gated, we end up with a SIGSEGV during a strcmp with a NULL argument.

* tools/virsh.c (cmdSnapshotList): Don't waste time on fallbacks
when --from is not present.
tools/virsh.c