Skip to content
Snippets Groups Projects
Commit 219303a6 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Check sftp_state before ending.

Fixes assertion failure on hangup from SSH.
parent 15765084
No related branches found
No related tags found
No related merge requests found
Pipeline #5374 passed
...@@ -614,7 +614,8 @@ add_public_key(void *vpriv) ...@@ -614,7 +614,8 @@ add_public_key(void *vpriv)
sftpc_state_t oldstate = sftp_state; sftpc_state_t oldstate = sftp_state;
sftp_state = NULL; sftp_state = NULL;
pthread_mutex_unlock(&ssh_mutex); pthread_mutex_unlock(&ssh_mutex);
sftpc_finish(oldstate); if (oldstate)
sftpc_finish(oldstate);
} }
close_sftp_channel(sftp_channel); close_sftp_channel(sftp_channel);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment