messages: Fix a possible null pointer dereference.
Этот коммит содержится в:
родитель
9460c5906f
Коммит
ed94e7f8a8
@ -947,7 +947,7 @@ end:
|
|||||||
|
|
||||||
/* TODO: make this function accept a ssh_channel */
|
/* TODO: make this function accept a ssh_channel */
|
||||||
ssh_channel ssh_message_channel_request_open_reply_accept(ssh_message msg) {
|
ssh_channel ssh_message_channel_request_open_reply_accept(ssh_message msg) {
|
||||||
ssh_session session = msg->session;
|
ssh_session session;
|
||||||
ssh_channel chan = NULL;
|
ssh_channel chan = NULL;
|
||||||
|
|
||||||
enter_function();
|
enter_function();
|
||||||
@ -957,6 +957,8 @@ ssh_channel ssh_message_channel_request_open_reply_accept(ssh_message msg) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
session = msg->session;
|
||||||
|
|
||||||
chan = ssh_channel_new(session);
|
chan = ssh_channel_new(session);
|
||||||
if (chan == NULL) {
|
if (chan == NULL) {
|
||||||
leave_function();
|
leave_function();
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user