ssh.c: add a missing delete_callbacks_for_context.

If an Ssh structure is destroyed while its IdempotentCallback
ssh->ic_out_raw is prnding, then the latter will stay on callback.c's
list pointing at the freed memory.
This commit is contained in:
Simon Tatham 2019-03-03 06:55:12 +00:00
Родитель 0ceb73fb10
Коммит 8c366766ae
1 изменённых файлов: 2 добавлений и 0 удалений

2
ssh.c
Просмотреть файл

@ -900,6 +900,8 @@ static void ssh_free(Backend *be)
ssh_gss_cleanup(ssh->gss_state.libs);
#endif
delete_callbacks_for_context(ssh); /* likely to catch ic_out_raw */
need_random_unref = ssh->need_random_unref;
sfree(ssh);