]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http2: on_frame_recv: get a proper 'conn' for the debug logging
authorDaniel Stenberg <daniel@haxx.se>
Mon, 24 Aug 2015 09:26:30 +0000 (11:26 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 24 Aug 2015 09:26:30 +0000 (11:26 +0200)
"Explicit null dereferenced (FORWARD_NULL)"

Coverity CID 1317366

lib/http2.c

index 0024add8a80988f172f5ad2dd4b7ed733c4c2b2b..197d05c0515f54a4e74198eab797a0eef2ae3910 100644 (file)
@@ -373,7 +373,7 @@ static int push_promise(struct SessionHandle *data,
 static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
                          void *userp)
 {
-  struct connectdata *conn = NULL;
+  struct connectdata *conn = (struct connectdata *)userp;
   struct http_conn *httpc = NULL;
   struct SessionHandle *data_s = NULL;
   struct HTTP *stream = NULL;
@@ -382,8 +382,6 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
   size_t left, ncopy;
   int32_t stream_id = frame->hd.stream_id;
 
-  (void)userp;
-
   if(!stream_id) {
     /* stream ID zero is for connection-oriented stuff */
     return 0;