Browse Source

100l, compute correctly poll_table size when allocating

Originally committed as revision 15238 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Baptiste Coudurier 17 years ago
parent
commit
a7f361eb13
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ffserver.c

+ 1
- 1
ffserver.c View File

@@ -545,7 +545,7 @@ static int http_server(void)
struct pollfd *poll_table, *poll_entry; struct pollfd *poll_table, *poll_entry;
HTTPContext *c, *c_next; 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); http_log("Impossible to allocate a poll table handling %d connections.\n", nb_max_http_connections);
return -1; return -1;
} }


Loading…
Cancel
Save