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 c9a2996544)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2022-05-23 01:23:22 +02:00
parent 97aee79b97
commit c40b7f3ceb
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 2 additions and 0 deletions

View File

@ -282,6 +282,8 @@ fail:
goto restart;
}
fail1:
if (fd >= 0)
closesocket(fd);
ret = AVERROR(EIO);
freeaddrinfo(ai);
return ret;