diff options
| author | Marcelo Tosatti | 2010-01-20 17:26:34 +0100 |
|---|---|---|
| committer | Anthony Liguori | 2010-01-26 22:45:06 +0100 |
| commit | f139a4125682ecd45d96c2d1523443d1be65405c (patch) | |
| tree | 27a302dd02f427510926693d05d30b30b20fff40 | |
| parent | qcow2: rename two QCowAIOCB members (diff) | |
| download | qemu-f139a4125682ecd45d96c2d1523443d1be65405c.tar.gz qemu-f139a4125682ecd45d96c2d1523443d1be65405c.tar.xz qemu-f139a4125682ecd45d96c2d1523443d1be65405c.zip | |
fix savevm command without id or tag
savevm without id or tag segfaults in:
(gdb) bt
#0 0x00007f600a83bf8a in __strcmp_sse42 () from /lib64/libc.so.6
#1 0x00000000004745b6 in bdrv_snapshot_find (bs=<value optimized out>,
sn_info=0x7fff996be280, name=0x0) at savevm.c:1631
#2 0x0000000000475c80 in del_existing_snapshots (name=<value optimized out>,
mon=<value optimized out>) at savevm.c:1654
#3 do_savevm (name=<value optimized out>, mon=<value optimized out>)
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| -rw-r--r-- | savevm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1695,7 +1695,7 @@ void do_savevm(Monitor *mon, const QDict *qdict) sn->vm_clock_nsec = qemu_get_clock(vm_clock); /* Delete old snapshots of the same name */ - if (del_existing_snapshots(mon, name) < 0) { + if (name && del_existing_snapshots(mon, name) < 0) { goto the_end; } |
