From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTrfS-0002qg-Ez for qemu-devel@nongnu.org; Thu, 01 Nov 2012 06:06:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTrfR-0006qz-F2 for qemu-devel@nongnu.org; Thu, 01 Nov 2012 06:06:30 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:43634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTrfR-0006qn-7U for qemu-devel@nongnu.org; Thu, 01 Nov 2012 06:06:29 -0400 Received: by mail-bk0-f45.google.com with SMTP id jf3so886856bkc.4 for ; Thu, 01 Nov 2012 03:06:28 -0700 (PDT) Date: Thu, 1 Nov 2012 11:06:26 +0100 From: Stefan Hajnoczi Message-ID: <20121101100626.GA20508@stefanha-thinkpad.redhat.com> References: <1351082052-13387-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1351082052-13387-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH] net: Reject non-netdevs in qmp_netdev_del() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org On Wed, Oct 24, 2012 at 02:34:12PM +0200, Stefan Hajnoczi wrote: > The netdev_del command crashes when given a -net device, because it > calls qemu_opts_del(NULL). > > Check that this is a -netdev before attempting to delete it and the > QemuOpts. > > Note the subtle change from qemu_find_opts_err("netdev", errp) to > qemu_find_opts_err("netdev", NULL). Since "netdev" is a built in > options group and we don't check for NULL return anyway, there's no use > in passing errp here. > > Signed-off-by: Stefan Hajnoczi > --- > net.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) Applied to the net tree: https://github.com/stefanha/qemu/commits/net Stefan