diff options
author | Stefan Weil <sw@weilnetz.de> | 2012-09-01 09:40:26 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2012-10-11 21:44:20 -0500 |
commit | 3c980e22acc8fcb070688417eb0d6d35d80c2b6b (patch) | |
tree | 742cf53902ac97b6de343854c8aea766389eebdf | |
parent | 907a34c9d7038abd68f9c06f026d7f049b5dbbe5 (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>
(cherry picked from commit 39b384591fda27d6e1213cea0b11b1ebe0ed4b74)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r-- | qemu-sockets.c | 2 |
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 */ |