From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZtRV-0001hW-HY for qemu-devel@nongnu.org; Tue, 26 Jan 2010 16:59:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZtRR-0001df-PV for qemu-devel@nongnu.org; Tue, 26 Jan 2010 16:59:25 -0500 Received: from [199.232.76.173] (port=47847 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZtRR-0001dU-Kz for qemu-devel@nongnu.org; Tue, 26 Jan 2010 16:59:21 -0500 Received: from mail-iw0-f188.google.com ([209.85.223.188]:60089) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZtRR-0008Vg-Bw for qemu-devel@nongnu.org; Tue, 26 Jan 2010 16:59:21 -0500 Received: by iwn26 with SMTP id 26so5373949iwn.14 for ; Tue, 26 Jan 2010 13:59:20 -0800 (PST) Message-ID: <4B5F65B5.3030403@codemonkey.ws> Date: Tue, 26 Jan 2010 15:59:17 -0600 From: Anthony Liguori 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; format=flowed 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 Applied. Thanks. Regards, Anthony Liguori On 01/20/2010 10:26 AM, Marcelo Tosatti wrote: > 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 > > > 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; > } > > > > >