1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

Fix possible close of invalid fd if call to socket() returns -1.

This commit is contained in:
Tim Potter 2008-02-18 10:43:46 +11:00 committed by Jeremy Allison
parent 39eef8e86c
commit f7d2f69299

View File

@ -1933,7 +1933,8 @@ int create_pipe_sock(const char *socket_dir,
out_close:
SAFE_FREE(path);
close(sock);
if (sock != -1)
close(sock);
out_umask:
umask(old_umask);