From e0877aa544b029c2ba0769233781733ba184fa02 Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Sat, 10 May 2014 18:16:19 -0400 Subject: [PATCH] ffserver: don't leak poll_table if poll fails Should fix Coverity Scan issue #732265 Signed-off-by: Reynaldo H. Verdejo Pinochet --- ffserver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ffserver.c b/ffserver.c index 9104984776..a6ab458de6 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;