summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-05-23 01:23:22 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2022-07-07 21:52:52 +0200
commitc9a2996544187f67e533bc24f4cf773e50d2362b (patch)
tree52e01796d8832924d36e17c45f237615f8f2af63 /libavformat
parentb418ad75c2238d36b1d28050e7f37911b9ae64d4 (diff)
avformat/sctp: close socket on errors
This is untested as i have no testcase Fixes: CID1302709 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/sctp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/sctp.c b/libavformat/sctp.c
index b8e23653d2..9d9e90097e 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;