- Fix that malloc failure for ngtcp2_conn_server_new

cleans up reference that older ngtcp2 versions can leave.
  Thanks to Qifan Zhang, Palo Alto Networks, for the report.
This commit is contained in:
W.C.A. Wijngaards
2026-06-17 15:33:06 +02:00
parent b5909d8d22
commit 8f2fbd66fc
3 changed files with 9 additions and 2 deletions
+5 -2
View File
@@ -1137,8 +1137,11 @@ static struct ngtcp2_conn* conn_client_setup(struct doq_client_data* data)
client_chosen_version, &cbs, &settings, &params,
NULL, /* ngtcp2_mem allocator, use default */
data /* callback argument */);
if(!conn) fatal_exit("could not ngtcp2_conn_client_new: %s",
ngtcp2_strerror(rv));
if(rv!=0) {
conn = NULL;
fatal_exit("could not ngtcp2_conn_client_new: %s",
ngtcp2_strerror(rv));
}
data->cc_algo = settings.cc_algo;
return conn;
}