summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-05-23 01:23:22 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2022-09-01 00:41:28 +0200
commit47dc801ec0d54923bbdda5d919cd22e9000d8484 (patch)
treeea998d19fdd0bd8ad7c6477954d5ab0a17147188
parentabbf22ac637133a69c920db5b316c1888e340e18 (diff)
downloadffmpeg-47dc801ec0d54923bbdda5d919cd22e9000d8484.tar.gz
avformat/sctp: close socket on errors
This is untested as i have no testcase Fixes: CID1302709 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit c9a2996544187f67e533bc24f4cf773e50d2362b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/sctp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/sctp.c b/libavformat/sctp.c
index 9a80e9b015..be0cb47865 100644
--- a/libavformat/sctp.c
+++ b/libavformat/sctp.c
@@ -282,6 +282,8 @@ fail:
goto restart;
}
fail1:
+ if (fd >= 0)
+ closesocket(fd);
ret = AVERROR(EIO);
freeaddrinfo(ai);
return ret;