mirror of
https://github.com/curl/curl.git
synced 2026-04-14 21:31:42 +03:00
http2: clear the h2 session at delete
When calling nghttp2 to delete session, clear the pointer to avoid risk of UAF. Pointed out by Codex Security Closes #20975
This commit is contained in:
parent
02e04eaee7
commit
a43ea5943b
1 changed files with 1 additions and 0 deletions
|
|
@ -203,6 +203,7 @@ static void cf_h2_ctx_close(struct cf_h2_ctx *ctx)
|
|||
{
|
||||
if(ctx->h2) {
|
||||
nghttp2_session_del(ctx->h2);
|
||||
ctx->h2 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue