aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-08-24 11:26:30 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-08-24 11:26:30 +0200
commit110d99c661c6a2dd4e7ec87c3aa7b2b649e5fa79 (patch)
tree688f00db92187e0c34eac94851902481f1144d52 /lib
parent6d91b70d8b9ef32bae8427483435009336c72e17 (diff)
http2: on_frame_recv: get a proper 'conn' for the debug logging
"Explicit null dereferenced (FORWARD_NULL)" Coverity CID 1317366
Diffstat (limited to 'lib')
-rw-r--r--lib/http2.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 0024add8a..197d05c05 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -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;