]> granicus.if.org Git - apache/commitdiff
Avoid a potential NULL pointer deference.
authorChristophe Jaillet <jailletc36@apache.org>
Thu, 5 May 2016 06:13:09 +0000 (06:13 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Thu, 5 May 2016 06:13:09 +0000 (06:13 +0000)
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

index 3ae02f4fd2ebdf56319403be47670aad4372c7cf..9a840e156709e4799e66f3cf4615886b1087e7e1 100644 (file)
@@ -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]",