mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
messages: Fix a possible null pointer dereference.
This commit is contained in:
@@ -947,7 +947,7 @@ end:
|
||||
|
||||
/* TODO: make this function accept a ssh_channel */
|
||||
ssh_channel ssh_message_channel_request_open_reply_accept(ssh_message msg) {
|
||||
ssh_session session = msg->session;
|
||||
ssh_session session;
|
||||
ssh_channel chan = NULL;
|
||||
|
||||
enter_function();
|
||||
@@ -957,6 +957,8 @@ ssh_channel ssh_message_channel_request_open_reply_accept(ssh_message msg) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
session = msg->session;
|
||||
|
||||
chan = ssh_channel_new(session);
|
||||
if (chan == NULL) {
|
||||
leave_function();
|
||||
|
||||
Reference in New Issue
Block a user