aboutsummaryrefslogtreecommitdiff
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
parentb548828862d3bf7214b7ef9cb361356b153b89c9 (diff)
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>
-rw-r--r--qemu-sockets.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-sockets.c b/qemu-sockets.c
index 361d890da3..037775b86b 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 */