aboutsummaryrefslogtreecommitdiff
path: root/qemu-sockets.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-09-01 09:40:26 +0200
committerStefan Hajnoczi <stefanha@gmail.com>2012-09-23 07:11:28 +0100
commit39b384591fda27d6e1213cea0b11b1ebe0ed4b74 (patch)
tree54e60954f1276ddc71dca9b771f6cbce79c3a0b2 /qemu-sockets.c
parentb548828862d3bf7214b7ef9cb361356b153b89c9 (diff)
downloadqemu-39b384591fda27d6e1213cea0b11b1ebe0ed4b74.zip
qemu-39b384591fda27d6e1213cea0b11b1ebe0ed4b74.tar.gz
qemu-39b384591fda27d6e1213cea0b11b1ebe0ed4b74.tar.bz2
qemu-sockets: Fix potential memory leak
The old code leaks variable 'peer'. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Diffstat (limited to 'qemu-sockets.c')
-rw-r--r--qemu-sockets.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-sockets.c b/qemu-sockets.c
index 361d890..037775b 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -353,7 +353,7 @@ int inet_dgram_opts(QemuOpts *opts)
if (0 != (rc = getaddrinfo(addr, port, &ai, &local))) {
fprintf(stderr,"getaddrinfo(%s,%s): %s\n", addr, port,
gai_strerror(rc));
- return -1;
+ goto err;
}
/* create socket */