1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-09 15:41:10 +03:00

session: Avoid potential null dereference on low-memory conditions

CID 1500478

Thanks coverity

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
Jakub Jelen
2023-06-28 10:43:51 +02:00
parent 62f013ae96
commit ebea7d9023

View File

@@ -651,6 +651,10 @@ int ssh_handle_packets(ssh_session session, int timeout)
}
spoll = ssh_socket_get_poll_handle(session->socket);
if (spoll == NULL) {
ssh_set_error_oom(session);
return SSH_ERROR;
}
ssh_poll_add_events(spoll, POLLIN);
ctx = ssh_poll_get_ctx(spoll);