From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXdh2-0001Gk-8r for qemu-devel@nongnu.org; Wed, 20 Jan 2010 11:46:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXdgx-0001Ak-Iy for qemu-devel@nongnu.org; Wed, 20 Jan 2010 11:46:07 -0500 Received: from [199.232.76.173] (port=33025 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXdgx-0001AR-7A for qemu-devel@nongnu.org; Wed, 20 Jan 2010 11:46:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20712) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXdgw-00038D-Ne for qemu-devel@nongnu.org; Wed, 20 Jan 2010 11:46:03 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0KGk1Vc006579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 20 Jan 2010 11:46:01 -0500 Message-ID: <4B573310.1040709@redhat.com> Date: Wed, 20 Jan 2010 17:45:04 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] fix savevm command without id or tag References: <20100120162634.GA15296@amt.cnet> In-Reply-To: <20100120162634.GA15296@amt.cnet> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: qemu-devel@nongnu.org Am 20.01.2010 17:26, schrieb Marcelo Tosatti: > > 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=, > sn_info=0x7fff996be280, name=0x0) at savevm.c:1631 > #2 0x0000000000475c80 in del_existing_snapshots (name=, > mon=) at savevm.c:1654 > #3 do_savevm (name=, mon=) > > Signed-off-by: Marcelo Tosatti Acked-by: Kevin Wolf > > > diff --git a/savevm.c b/savevm.c > index b3bb909..2fd3de6 100644 > --- a/savevm.c > +++ b/savevm.c > @@ -1718,7 +1718,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; > } > > >