mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
control_shm: add missing socket close to the error path (coverity)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
51881cacc0
commit
d6ba264038
1 changed files with 3 additions and 1 deletions
|
|
@ -424,8 +424,10 @@ static int make_local_socket(const char *filename)
|
||||||
addr->sun_family = AF_LOCAL;
|
addr->sun_family = AF_LOCAL;
|
||||||
memcpy(addr->sun_path, filename, l);
|
memcpy(addr->sun_path, filename, l);
|
||||||
|
|
||||||
if (connect(sock, (struct sockaddr *) addr, size) < 0)
|
if (connect(sock, (struct sockaddr *) addr, size) < 0) {
|
||||||
|
close(sock);
|
||||||
return -errno;
|
return -errno;
|
||||||
|
}
|
||||||
return sock;
|
return sock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue