From 5c3bafcf074bc7256586c8ffab492128927558a5 Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Thu, 5 May 2016 06:13:09 +0000 Subject: [PATCH] Avoid a potential NULL pointer deference. Not sure this can happen, but the tests in this function handle such a case, so they should handle it correctly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1742359 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http2/h2_mplx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/http2/h2_mplx.c b/modules/http2/h2_mplx.c index 3ae02f4fd2..9a840e1567 100644 --- a/modules/http2/h2_mplx.c +++ b/modules/http2/h2_mplx.c @@ -465,8 +465,10 @@ static int task_print(void *ctx, void *val) { h2_mplx *m = ctx; h2_task *task = val; - h2_stream *stream = h2_ihash_get(m->streams, task->stream_id); - if (task->request) { + + if (task && task->request) { + h2_stream *stream = h2_ihash_get(m->streams, task->stream_id); + ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, m->c, /* NO APLOGNO */ "->03198: h2_stream(%s): %s %s %s -> %s %d" "[orph=%d/started=%d/done=%d]", -- 2.50.1