1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

bind: Correctly free all memory in ssh_bind_free().

Thanks to Jacob Baines.
This commit is contained in:
Andreas Schneider
2013-12-09 19:49:54 +01:00
parent a1f0b2acfc
commit 4f4e917187

View File

@@ -341,11 +341,15 @@ void ssh_bind_free(ssh_bind sshbind){
/* options */ /* options */
SAFE_FREE(sshbind->banner); SAFE_FREE(sshbind->banner);
SAFE_FREE(sshbind->bindaddr);
SAFE_FREE(sshbind->dsakey); SAFE_FREE(sshbind->dsakey);
SAFE_FREE(sshbind->rsakey); SAFE_FREE(sshbind->rsakey);
SAFE_FREE(sshbind->dsa); SAFE_FREE(sshbind->ecdsakey);
SAFE_FREE(sshbind->rsa);
SAFE_FREE(sshbind->bindaddr); ssh_key_free(sshbind->dsa);
ssh_key_free(sshbind->rsa);
ssh_key_free(sshbind->ecdsa);
for (i = 0; i < 10; i++) { for (i = 0; i < 10; i++) {
if (sshbind->wanted_methods[i]) { if (sshbind->wanted_methods[i]) {