diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2016-05-05 08:13:09 +0200 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2016-05-05 08:13:09 +0200 |
commit | 5c3bafcf074bc7256586c8ffab492128927558a5 (patch) | |
tree | 6080d81f2017383933fc8e17cc942d196d856318 /modules | |
parent | addendum to r1742260 (diff) | |
download | apache2-5c3bafcf074bc7256586c8ffab492128927558a5.tar.xz apache2-5c3bafcf074bc7256586c8ffab492128927558a5.zip |
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
Diffstat (limited to 'modules')
-rw-r--r-- | modules/http2/h2_mplx.c | 6 |
1 files 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]", |