mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
messages: Fix a possible double free.
Thanks to Ramana Gampa. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -1371,6 +1371,7 @@ int ssh_message_handle_channel_request(ssh_session session, ssh_channel channel,
|
|||||||
msg->channel_request.pxheight = ntohl(msg->channel_request.pxheight);
|
msg->channel_request.pxheight = ntohl(msg->channel_request.pxheight);
|
||||||
msg->channel_request.modes = buffer_get_ssh_string(packet);
|
msg->channel_request.modes = buffer_get_ssh_string(packet);
|
||||||
if (msg->channel_request.modes == NULL) {
|
if (msg->channel_request.modes == NULL) {
|
||||||
|
msg->channel_request.TERM = NULL;
|
||||||
SAFE_FREE(term_c);
|
SAFE_FREE(term_c);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user