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))) {
|
||||
fprintf(stderr,"getaddrinfo(%s,%s): %s\n", addr, port,
|
||||
gai_strerror(rc));
|
||||
return -1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* create socket */
|
||||
|
Loading…
Reference in New Issue
Block a user