Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com>
---
 lavfhttpd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lavfhttpd.c b/lavfhttpd.c
index 3cf9958..5488e14 100644
--- a/lavfhttpd.c
+++ b/lavfhttpd.c
@@ -74,6 +74,10 @@ int lavfhttpd_accept(void *server, struct HTTPClient 
**client, int reply_code)
     client_ctx->seekable = 0;
     ret2 = HTTPD_OK;
     client_http = av_malloc(sizeof(struct HTTPClient));
+    if (!client_http) {
+        av_log(server, AV_LOG_ERROR, "Could not allocate http client.\n");
+        return HTTPD_OTHER_ERROR;
+    }
     client_http->method = NULL;
     client_http->resource = NULL;
     client_http->httpd_data = client_ctx;
-- 
2.16.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to