diff options
author | Michael Niedermayer | 2013-10-20 16:34:32 +0200 |
---|---|---|
committer | Michael Niedermayer | 2013-10-20 16:34:32 +0200 |
commit | baab248c499a7689aefb5f2e9c004338deb08d74 (patch) | |
tree | f2333d31798fece32eca4cc20b0cd77c90c2ca23 /libavformat | |
parent | 78e6f83ce027bc4cfee055a3d68e97a6d35ea434 (diff) |
avformat/network: check for fcntl() failure in ff_socket()
Fixes: CID1087075
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/network.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/network.c b/libavformat/network.c index 4f0486196f..2ba435d472 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -245,8 +245,10 @@ int ff_socket(int af, int type, int proto) { fd = socket(af, type, proto); #if HAVE_FCNTL - if (fd != -1) - fcntl(fd, F_SETFD, FD_CLOEXEC); + if (fd != -1) { + if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) + av_log(NULL, AV_LOG_DEBUG, "Failed to set close on exec\n"); + } #endif } return fd; |