commit | 39b384591fda27d6e1213cea0b11b1ebe0ed4b74 | [log] [tgz] |
---|---|---|
author | Stefan Weil <sw@weilnetz.de> | Sat Sep 01 09:40:26 2012 +0200 |
committer | Stefan Hajnoczi <stefanha@gmail.com> | Sun Sep 23 07:11:28 2012 +0100 |
tree | 54e60954f1276ddc71dca9b771f6cbce79c3a0b2 | |
parent | b548828862d3bf7214b7ef9cb361356b153b89c9 [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>
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 @@ 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 */