Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwMsn-0006Mv-Op for qemu-devel@nongnu.org; Tue, 21 Apr 2009 16:47:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwMsn-0006Mj-9p for qemu-devel@nongnu.org; Tue, 21 Apr 2009 16:47:57 -0400 Received: from [199.232.76.173] (port=48034 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwMsn-0006Mg-3n for qemu-devel@nongnu.org; Tue, 21 Apr 2009 16:47:57 -0400 Received: from savannah.gnu.org ([199.232.41.3]:33461 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LwMsm-00046l-NM for qemu-devel@nongnu.org; Tue, 21 Apr 2009 16:47:56 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LwMsm-00052x-80 for qemu-devel@nongnu.org; Tue, 21 Apr 2009 20:47:56 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LwMsm-00052t-2G for qemu-devel@nongnu.org; Tue, 21 Apr 2009 20:47:56 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Tue, 21 Apr 2009 20:47:56 +0000 Subject: [Qemu-devel] [7206] net: Fix -net socket,listen (Jan Kiszka) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 7206 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7206 Author: aliguori Date: 2009-04-21 20:47:55 +0000 (Tue, 21 Apr 2009) Log Message: ----------- net: Fix -net socket,listen (Jan Kiszka) 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 Signed-off-by: Anthony Liguori Modified Paths: -------------- branches/stable_0_10/net.c Modified: branches/stable_0_10/net.c =================================================================== --- branches/stable_0_10/net.c 2009-04-21 20:47:51 UTC (rev 7205) +++ branches/stable_0_10/net.c 2009-04-21 20:47:55 UTC (rev 7206) @@ -1468,7 +1468,7 @@ } s->vlan = vlan; s->model = strdup(model); - s->name = strdup(name); + s->name = name ? strdup(name) : NULL; s->fd = fd; qemu_set_fd_handler(fd, net_socket_accept, NULL, s); return 0;