mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-26 00:31:12 +00:00
Minor bugfix to prevent segfault if a malloc fails. I have no idea what
will happen, but at least this crash is gone. Originally committed as revision 2307 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
80de6a80a9
commit
8bc80f8b24
@ -534,7 +534,6 @@ static int http_server(void)
|
|||||||
|
|
||||||
first_http_ctx = NULL;
|
first_http_ctx = NULL;
|
||||||
nb_connections = 0;
|
nb_connections = 0;
|
||||||
first_http_ctx = NULL;
|
|
||||||
|
|
||||||
start_multicast();
|
start_multicast();
|
||||||
|
|
||||||
@ -681,8 +680,6 @@ static void new_connection(int server_fd, int is_rtsp)
|
|||||||
if (!c)
|
if (!c)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
c->next = first_http_ctx;
|
|
||||||
first_http_ctx = c;
|
|
||||||
c->fd = fd;
|
c->fd = fd;
|
||||||
c->poll_entry = NULL;
|
c->poll_entry = NULL;
|
||||||
c->from_addr = from_addr;
|
c->from_addr = from_addr;
|
||||||
@ -690,6 +687,9 @@ static void new_connection(int server_fd, int is_rtsp)
|
|||||||
c->buffer = av_malloc(c->buffer_size);
|
c->buffer = av_malloc(c->buffer_size);
|
||||||
if (!c->buffer)
|
if (!c->buffer)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
c->next = first_http_ctx;
|
||||||
|
first_http_ctx = c;
|
||||||
nb_connections++;
|
nb_connections++;
|
||||||
|
|
||||||
start_wait_request(c, is_rtsp);
|
start_wait_request(c, is_rtsp);
|
||||||
|
Loading…
Reference in New Issue
Block a user