From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lu509-0005gw-Mh for qemu-devel@nongnu.org; Wed, 15 Apr 2009 09:18:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lu505-0005gN-V5 for qemu-devel@nongnu.org; Wed, 15 Apr 2009 09:18:05 -0400 Received: from [199.232.76.173] (port=44430 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lu505-0005gK-Qq for qemu-devel@nongnu.org; Wed, 15 Apr 2009 09:18:01 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56869) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lu505-0007dl-Gp for qemu-devel@nongnu.org; Wed, 15 Apr 2009 09:18:01 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3FDI0dD029325 for ; Wed, 15 Apr 2009 09:18:00 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3FDHxZc005607 for ; Wed, 15 Apr 2009 09:17:59 -0400 Received: from [127.0.0.1] (file.rdu.redhat.com [10.11.255.147]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3FDHth2008200 for ; Wed, 15 Apr 2009 09:17:58 -0400 Subject: Re: [Qemu-devel] [PATCH 1/7] net: Fix -net socket,listen From: Mark McLoughlin In-Reply-To: <20090414172954.15035.11472.stgit@mchn012c.ww002.siemens.net> References: <20090414172954.15035.73053.stgit@mchn012c.ww002.siemens.net> <20090414172954.15035.11472.stgit@mchn012c.ww002.siemens.net> Content-Type: text/plain Date: Wed, 15 Apr 2009 14:09:32 +0100 Message-Id: <1239800972.4431.127.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: Mark McLoughlin , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Tue, 2009-04-14 at 19:29 +0200, Jan Kiszka wrote: > In case no symbolic name is provided when requesting VLAN connection via > listening TCP socket ('-net socket,listen=...'), qemu crashes. This > fixes the cause. > > Signed-off-by: Jan Kiszka > --- > > net.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/net.c b/net.c > index 5365891..c7e4a0b 100644 > --- a/net.c > +++ b/net.c > @@ -1440,7 +1440,7 @@ static int net_socket_listen_init(VLANState *vlan, > } > s->vlan = vlan; > s->model = strdup(model); > - s->name = strdup(name); > + s->name = name ? strdup(name) : NULL; Yep, this is a slightly unusual case because we're not allocating a VLANClientState here which would cause a default name to be assigned. Acked-by: Mark McLoughlin Cheers, Mark.