http2: on_frame_recv: get a proper 'conn' for the debug logging
"Explicit null dereferenced (FORWARD_NULL)" Coverity CID 1317366
This commit is contained in:
@@ -373,7 +373,7 @@ static int push_promise(struct SessionHandle *data,
|
|||||||
static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
|
static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
|
||||||
void *userp)
|
void *userp)
|
||||||
{
|
{
|
||||||
struct connectdata *conn = NULL;
|
struct connectdata *conn = (struct connectdata *)userp;
|
||||||
struct http_conn *httpc = NULL;
|
struct http_conn *httpc = NULL;
|
||||||
struct SessionHandle *data_s = NULL;
|
struct SessionHandle *data_s = NULL;
|
||||||
struct HTTP *stream = 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;
|
size_t left, ncopy;
|
||||||
int32_t stream_id = frame->hd.stream_id;
|
int32_t stream_id = frame->hd.stream_id;
|
||||||
|
|
||||||
(void)userp;
|
|
||||||
|
|
||||||
if(!stream_id) {
|
if(!stream_id) {
|
||||||
/* stream ID zero is for connection-oriented stuff */
|
/* stream ID zero is for connection-oriented stuff */
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user