1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

Not free external allocated memory blocks.

The pointer wsi->user_space is an external allocated memory block.
So it will be clearer that libwebsocket don’t free it but let the block
owner (the user of libwebsocket) to handle the cleanup and free.
This commit is contained in:
seamxr 2014-06-25 14:09:17 -07:00
parent dfca3abfa1
commit e033362cb5

View file

@ -278,10 +278,6 @@ just_kill_connection:
context->protocols[0].callback(context, wsi,
LWS_CALLBACK_WSI_DESTROY, wsi->user_space, NULL, 0);
if (wsi->protocol && wsi->protocol->per_session_data_size &&
wsi->user_space) /* user code may own */
free(wsi->user_space);
free(wsi);
}