[7206] net: Fix -net socket,listen (Jan Kiszka)
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 <[email protected]>
Signed-off-by Anthony Liguori <[email protected]>
Modified Paths:
--------------
branches/stable_0_10/net.c
Modified: branches/stable_0_10/net.c
===================================================================
stable_0_10/net.c +1 -1
@@ -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 ;