summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2022-05-23 01:23:22 +0200
committerMichael Niedermayer <[email protected]>2022-07-12 22:27:50 +0200
commit6d40df7ea76680071ef7ed96731a21a0f0f83407 (patch)
tree907a9ace901cc47dc63fa5aa29a50f772d16fc0a
parent384b5dc0f196d5e5809851093985eb2cfb6e8bf8 (diff)
avformat/sctp: close socket on errors
This is untested as i have no testcase Fixes: CID1302709 Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit c9a2996544187f67e533bc24f4cf773e50d2362b) Signed-off-by: Michael Niedermayer <[email protected]>
-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;