Commit a7cc78cb authored by Jordi Ortiz's avatar Jordi Ortiz Committed by Martin Storsjö

tcp: Check the listen call

Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent ae702edf
......@@ -90,7 +90,11 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
ret = ff_neterrno();
goto fail1;
}
listen(fd, 1);
ret = listen(fd, 1);
if (ret) {
ret = ff_neterrno();
goto fail1;
}
fd1 = accept(fd, NULL, NULL);
if (fd1 < 0) {
ret = ff_neterrno();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment