projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b548828
)
qemu-sockets: Fix potential memory leak
author
Stefan Weil
<sw@weilnetz.de>
Sat, 1 Sep 2012 07:40:26 +0000
(09:40 +0200)
committer
Stefan Hajnoczi
<stefanha@gmail.com>
Sun, 23 Sep 2012 06:11:28 +0000
(07:11 +0100)
The old code leaks variable 'peer'.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
qemu-sockets.c
patch
|
blob
|
history
diff --git
a/qemu-sockets.c
b/qemu-sockets.c
index 361d890da3e812abb6d2e09088bc2c0f6792d54d..037775b86bda8a9f18baba78fd323d7cc76f7f78 100644
(file)
--- 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 */