diff --git a/libavformat/sctp.c b/libavformat/sctp.c index 1d8261576c..058dfbf1fc 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;