diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-12-09 19:49:54 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-12-09 19:50:52 +0100 |
commit | bb88b637a9349c8249be2e291c6e85860116ef76 (patch) | |
tree | 4eb2f4e753f39a7882903747c571ec4a8f59410c /src | |
parent | 60d58247600eadedb267357f4f7a8342873b3c38 (diff) | |
download | libssh-bb88b637a9349c8249be2e291c6e85860116ef76.tar.gz libssh-bb88b637a9349c8249be2e291c6e85860116ef76.tar.xz libssh-bb88b637a9349c8249be2e291c6e85860116ef76.zip |
bind: Correctly free all memory in ssh_bind_free().
Thanks to Jacob Baines.
Diffstat (limited to 'src')
-rw-r--r-- | src/bind.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -341,11 +341,15 @@ void ssh_bind_free(ssh_bind sshbind){ /* options */ SAFE_FREE(sshbind->banner); + SAFE_FREE(sshbind->bindaddr); + SAFE_FREE(sshbind->dsakey); SAFE_FREE(sshbind->rsakey); - SAFE_FREE(sshbind->dsa); - SAFE_FREE(sshbind->rsa); - SAFE_FREE(sshbind->bindaddr); + SAFE_FREE(sshbind->ecdsakey); + + ssh_key_free(sshbind->dsa); + ssh_key_free(sshbind->rsa); + ssh_key_free(sshbind->ecdsa); for (i = 0; i < 10; i++) { if (sshbind->wanted_methods[i]) { |