Commit d8421dcd authored by Dridi Boukelmoune's avatar Dridi Boukelmoune Committed by Nils Goroll

Assert priv is not null before dereferencing it

And make it clear that we steal the reference at this point.
parent d4902551
......@@ -86,11 +86,10 @@ h2_fini(struct req *req, void **priv)
struct h2_req *r2;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CAST_OBJ_NOTNULL(r2, *priv, H2_REQ_MAGIC);
TAKE_OBJ_NOTNULL(r2, priv, H2_REQ_MAGIC);
H2_Send_Get(req->wrk, r2->h2sess, r2);
H2_Send(req->wrk, r2, H2_F_DATA, H2FF_DATA_END_STREAM, 0, "");
H2_Send_Rel(r2->h2sess, r2);
*priv = NULL;
return (0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment