diff options
author | Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com> | 2014-04-26 02:38:24 +0400 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com> | 2014-04-26 02:49:55 +0400 |
commit | 7228bdeebd2835172b4c3697e1e681399531f3e6 (patch) | |
tree | 50e7b0155e6d4cf69d0895a95b9209738ec8fa21 /ffserver.c | |
parent | 1404e2a389fcaa7ebc7852ee74c96641c394fa14 (diff) |
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>
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ffserver.c b/ffserver.c index cc736cb871..b9825a1d68 100644 --- a/ffserver.c +++ b/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; } |