diff --git a/libssh/sftp.c b/libssh/sftp.c index b4a7f813..6d50c75a 100644 --- a/libssh/sftp.c +++ b/libssh/sftp.c @@ -384,7 +384,7 @@ static int sftp_read_and_dispatch(SFTP_SESSION *sftp) { msg = sftp_get_message(packet); sftp_packet_free(packet); - if (message == NULL) { + if (msg == NULL) { sftp_leave_function(); return -1; }