[FFmpeg-cvslog] ffserver: don't leak poll_table if poll fails
Reynaldo H. Verdejo Pinochet
git at videolan.org
Sun May 11 00:27:39 CEST 2014
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet <r.verdejo at sisa.samsung.com> | Sat May 10 18:16:19 2014 -0400| [e0877aa544b029c2ba0769233781733ba184fa02] | committer: Reynaldo H. Verdejo Pinochet
ffserver: don't leak poll_table if poll fails
Should fix Coverity Scan issue #732265
Signed-off-by: Reynaldo H. Verdejo Pinochet <r.verdejo at sisa.samsung.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e0877aa544b029c2ba0769233781733ba184fa02
---
ffserver.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ffserver.c b/ffserver.c
index 9104984..a6ab458 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -747,8 +747,10 @@ static int http_server(void)
do {
ret = poll(poll_table, poll_entry - poll_table, delay);
if (ret < 0 && ff_neterrno() != AVERROR(EAGAIN) &&
- ff_neterrno() != AVERROR(EINTR))
+ ff_neterrno() != AVERROR(EINTR)) {
+ av_free(poll_table);
return -1;
+ }
} while (ret < 0);
cur_time = av_gettime() / 1000;
More information about the ffmpeg-cvslog
mailing list