mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 14:50:22 +00:00
reds_init_socket: do not leak slisten on error
Found by Coverity. Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
7ff434b104
commit
1a16419431
@ -2588,6 +2588,7 @@ static int reds_init_socket(const char *addr, int portnr, int family)
|
||||
len = SUN_LEN(&local);
|
||||
if (bind(slisten, (struct sockaddr *)&local, len) == -1) {
|
||||
perror("bind");
|
||||
close(slisten);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user