mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
h2 client: dont leak original user_space for network wsi
When creating the stream from the nwsi, the stream was created with its own user_space that gets overwritten with the nwsi one as it is demoted to be the stream. Stop that leaking.
This commit is contained in:
parent
45ec3ce369
commit
6de416d811
1 changed files with 2 additions and 0 deletions
|
@ -1294,6 +1294,8 @@ lws_h2_parse_end_of_frame(struct lws *wsi)
|
|||
h2n->swsi->client_h2_substream = 1;
|
||||
|
||||
h2n->swsi->protocol = wsi->protocol;
|
||||
if (h2n->swsi->user_space && !h2n->swsi->user_space_externally_allocated)
|
||||
lws_free(h2n->swsi->user_space);
|
||||
h2n->swsi->user_space = wsi->user_space;
|
||||
h2n->swsi->user_space_externally_allocated =
|
||||
wsi->user_space_externally_allocated;
|
||||
|
|
Loading…
Add table
Reference in a new issue