]> git.proxmox.com Git - qemu.git/blobdiff - savevm.c
fix savevm command without id or tag
[qemu.git] / savevm.c
index aefe052cd3b691072887b49468c78512d1c967ff..cb4105a4bc6ec2838b589331ddc2b2a3f0e751a7 100644 (file)
--- a/savevm.c
+++ b/savevm.c
@@ -1696,7 +1696,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;
     }