diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-21 19:56:11 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-21 19:56:11 +0000 |
commit | ea053add700d8abe203cd79a9ffb082aee4eabc0 (patch) | |
tree | fdbcc7ebf4a2db2e249b9dd5fb4b0024a62b26fe | |
parent | e8f1f9db8787be08e0ae3ed5a94da68966dbfff1 (diff) | |
download | hqemu-ea053add700d8abe203cd79a9ffb082aee4eabc0.zip hqemu-ea053add700d8abe203cd79a9ffb082aee4eabc0.tar.gz |
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 <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7196 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | net.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1472,7 +1472,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; s->fd = fd; qemu_set_fd_handler(fd, net_socket_accept, NULL, s); return 0; |