qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: qemu-devel@nongnu.org
Cc: Jan Kiszka <jan.kiszka@siemens.com>, aliguori@us.ibm.com
Subject: [Qemu-devel] [PATCH STABLE 1/2] net: Fix -net socket, listen (Jan Kiszka)
Date: Wed, 20 May 2009 20:44:29 -0400	[thread overview]
Message-ID: <1242866670-15488-2-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1242866670-15488-1-git-send-email-glommer@redhat.com>

From: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>

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

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net.c b/net.c
index ae54421..3938a02 100644
--- a/net.c
+++ b/net.c
@@ -1468,7 +1468,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;
-- 
1.5.6.6

  reply	other threads:[~2009-05-21  0:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21  0:44 [Qemu-devel] [PATCH STABLE 0/2] Backport -net socket fixes Glauber Costa
2009-05-21  0:44 ` Glauber Costa [this message]
2009-05-21  0:44   ` [Qemu-devel] [PATCH STABLE 2/2] net: Fix -net socket parameter checks Glauber Costa
2009-05-21  6:23     ` [Qemu-devel] " Jan Kiszka
2009-05-21 12:12       ` Glauber Costa
2009-05-21 16:26         ` Jan Kiszka
2009-05-21 16:38           ` Glauber Costa
2009-05-21 16:45             ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1242866670-15488-2-git-send-email-glommer@redhat.com \
    --to=glommer@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).