Commit a7f361eb authored by Baptiste Coudurier's avatar Baptiste Coudurier

100l, compute correctly poll_table size when allocating

Originally committed as revision 15238 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 4fce284c
......@@ -545,7 +545,7 @@ static int http_server(void)
struct pollfd *poll_table, *poll_entry;
HTTPContext *c, *c_next;
if(!(poll_table = av_mallocz(nb_max_http_connections + 2))) {
if(!(poll_table = av_mallocz((nb_max_http_connections + 2)*sizeof(*poll_table)))) {
http_log("Impossible to allocate a poll table handling %d connections.\n", nb_max_http_connections);
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment