mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
sshd: fix leak on disconnect
Disconnect wants to keep a copy of the description string, but it is never freed. Make it ephemeral just for the ->disconnect_reason() op so it is cleaned out correctly.
This commit is contained in:
parent
095798d5d9
commit
270a14813f
1 changed files with 0 additions and 1 deletions
|
@ -1349,7 +1349,6 @@ again:
|
|||
|
||||
case SSHS_NVC_DISCONNECT_DESC:
|
||||
pss->disconnect_desc = (char *)pss->last_alloc;
|
||||
pss->last_alloc = NULL; /* it was adopted */
|
||||
state_get_string(pss, SSHS_NVC_DISCONNECT_LANG);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue