mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
ffserver: fix missing frees at connection setup
Should fix FFmpeg Coverity Scan issue #732266 and some of #732265 Signed-off-by: Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
This commit is contained in:
parent
1404e2a389
commit
7228bdeebd
10
ffserver.c
10
ffserver.c
@ -648,18 +648,24 @@ static int http_server(void)
|
||||
|
||||
if (my_http_addr.sin_port) {
|
||||
server_fd = socket_open_listen(&my_http_addr);
|
||||
if (server_fd < 0)
|
||||
if (server_fd < 0) {
|
||||
av_free(poll_table);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (my_rtsp_addr.sin_port) {
|
||||
rtsp_server_fd = socket_open_listen(&my_rtsp_addr);
|
||||
if (rtsp_server_fd < 0)
|
||||
if (rtsp_server_fd < 0) {
|
||||
av_free(poll_table);
|
||||
closesocket(server_fd);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!rtsp_server_fd && !server_fd) {
|
||||
http_log("HTTP and RTSP disabled.\n");
|
||||
av_free(poll_table);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user