mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/network: check for fcntl() failure in ff_socket()
Fixes: CID1087075 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
78e6f83ce0
commit
baab248c49
@ -245,8 +245,10 @@ int ff_socket(int af, int type, int proto)
|
|||||||
{
|
{
|
||||||
fd = socket(af, type, proto);
|
fd = socket(af, type, proto);
|
||||||
#if HAVE_FCNTL
|
#if HAVE_FCNTL
|
||||||
if (fd != -1)
|
if (fd != -1) {
|
||||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
|
||||||
|
av_log(NULL, AV_LOG_DEBUG, "Failed to set close on exec\n");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return fd;
|
return fd;
|
||||||
|
Loading…
Reference in New Issue
Block a user