sftpserver: Do not override the ssh error code

Fixes: https://gitlab.com/libssh/libssh-mirror/-/issues/275#note_2162076660

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Sahana Prasad <sahana@redhat.com>
(cherry picked from commit d0ecb5388c)
This commit is contained in:
Jakub Jelen
2024-10-21 21:00:23 +02:00
parent 758fbdd31b
commit 5bff8b5dc6

View File

@@ -258,13 +258,11 @@ error:
sftp_client_message sftp_get_client_message(sftp_session sftp)
{
ssh_session session = sftp->session;
sftp_packet packet;
sftp_packet packet = NULL;
packet = sftp_packet_read(sftp);
if (packet == NULL) {
ssh_set_error_oom(session);
return NULL;
return NULL;
}
return sftp_make_client_message(sftp, packet);
}