1
0
Fork 0
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:
Andy Green 2019-08-08 21:15:57 +01:00
parent 45ec3ce369
commit 6de416d811

View file

@ -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;