diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-09-03 17:22:34 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-09-08 11:36:38 +0200 |
commit | 9bef81c769738de9a3470959b276c25e6837a22f (patch) | |
tree | 3054e466d117d085905da1c4ea65c8372b0ffe2e /libssh | |
parent | 1093fb43ca7cb139efbe580bf6d0e9bbd68b1101 (diff) | |
download | libssh-9bef81c769738de9a3470959b276c25e6837a22f.tar.gz libssh-9bef81c769738de9a3470959b276c25e6837a22f.tar.xz libssh-9bef81c769738de9a3470959b276c25e6837a22f.zip |
Fix the free calls and use the safe free macro.
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/wrapper.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libssh/wrapper.c b/libssh/wrapper.c index a8ec3859..9e54c9fe 100644 --- a/libssh/wrapper.c +++ b/libssh/wrapper.c @@ -963,8 +963,8 @@ int crypt_set_algorithms_server(SSH_SESSION *session){ ssh_log(session,SSH_LOG_PACKET,"enabling C->S compression"); session->next_crypto->do_compress_in=1; } - free(match); - + SAFE_FREE(match); + client=session->client_kex.methods[SSH_CRYPT_S_C]; server=session->server_kex.methods[SSH_CRYPT_S_C]; match=ssh_find_matching(client,server); @@ -972,8 +972,8 @@ int crypt_set_algorithms_server(SSH_SESSION *session){ ssh_log(session,SSH_LOG_PACKET,"enabling S->C compression\n"); session->next_crypto->do_compress_out=1; } - free(match); - + SAFE_FREE(match); + server=session->server_kex.methods[SSH_HOSTKEYS]; client=session->client_kex.methods[SSH_HOSTKEYS]; match=ssh_find_matching(client,server); @@ -984,11 +984,11 @@ int crypt_set_algorithms_server(SSH_SESSION *session){ else { ssh_set_error(session, SSH_FATAL, "Cannot know what %s is into %s", match ? match : NULL, server); - free(match); + SAFE_FREE(match); leave_function(); return SSH_ERROR; } - free(match); + SAFE_FREE(match); leave_function(); return SSH_OK; } |