aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-14 07:59:21 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2011-12-14 07:59:21 -0600
commit9423a2e8dd362a271bfe194ec131062814557b95 (patch)
tree6b10b2d69e5d81b6ff4cb2ba75693d8a65362d92 /net
parentda5361cc685c004d8bb4e7c5e7b3a52c7aca2c56 (diff)
parent126c79133f77d1b0b7c3849899c6d5f83b2fd410 (diff)
Merge remote-tracking branch 'stefanha/trivial-patches-next' into staging
Diffstat (limited to 'net')
-rw-r--r--net/socket.c3
-rw-r--r--net/tap-solaris.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c
index f999c26597..aaf9be48e2 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -414,6 +414,7 @@ static int net_socket_listen_init(VLANState *vlan,
fd = qemu_socket(PF_INET, SOCK_STREAM, 0);
if (fd < 0) {
perror("socket");
+ g_free(s);
return -1;
}
socket_set_nonblock(fd);
@@ -425,11 +426,13 @@ static int net_socket_listen_init(VLANState *vlan,
ret = bind(fd, (struct sockaddr *)&saddr, sizeof(saddr));
if (ret < 0) {
perror("bind");
+ g_free(s);
return -1;
}
ret = listen(fd, 0);
if (ret < 0) {
perror("listen");
+ g_free(s);
return -1;
}
s->vlan = vlan;
diff --git a/net/tap-solaris.c b/net/tap-solaris.c
index c216d28267..cf764634ef 100644
--- a/net/tap-solaris.c
+++ b/net/tap-solaris.c
@@ -65,7 +65,7 @@ static int tap_alloc(char *dev, size_t dev_size)
static int arp_fd = 0;
int ip_muxid, arp_muxid;
struct strioctl strioc_if, strioc_ppa;
- int link_type = I_PLINK;;
+ int link_type = I_PLINK;
struct lifreq ifr;
char actual_name[32] = "";