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:
parent
dfca3abfa1
commit
e033362cb5
1 changed files with 0 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue