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:
Stefan Weil 2012-09-01 09:40:26 +02:00 committed by Stefan Hajnoczi
parent b548828862
commit 39b384591f

View File

@ -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 */