mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-06 22:33:05 +00:00
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>
This commit is contained in:
parent
b548828862
commit
39b384591f
@ -353,7 +353,7 @@ int inet_dgram_opts(QemuOpts *opts)
|
|||||||
if (0 != (rc = getaddrinfo(addr, port, &ai, &local))) {
|
if (0 != (rc = getaddrinfo(addr, port, &ai, &local))) {
|
||||||
fprintf(stderr,"getaddrinfo(%s,%s): %s\n", addr, port,
|
fprintf(stderr,"getaddrinfo(%s,%s): %s\n", addr, port,
|
||||||
gai_strerror(rc));
|
gai_strerror(rc));
|
||||||
return -1;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create socket */
|
/* create socket */
|
||||||
|
Loading…
Reference in New Issue
Block a user