aboutsummaryrefslogtreecommitdiff
path: root/libssh/dh.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-04-17 14:47:53 +0000
committerAndreas Schneider <mail@cynapses.org>2009-04-17 14:47:53 +0000
commit25e80032bae82e2ed3628c69a5fff9afc6d77faf (patch)
treec4fae1aca4fc4c4f0a006718a9b94522188118b4 /libssh/dh.c
parent7e3307cb449527aa51a70c3eb608be7ea8d7ac6f (diff)
downloadlibssh-25e80032bae82e2ed3628c69a5fff9afc6d77faf.tar.gz
libssh-25e80032bae82e2ed3628c69a5fff9afc6d77faf.tar.xz
libssh-25e80032bae82e2ed3628c69a5fff9afc6d77faf.zip
Don't leak memory in error path.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@525 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/dh.c')
-rw-r--r--libssh/dh.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libssh/dh.c b/libssh/dh.c
index ccfc6cd..619a4d2 100644
--- a/libssh/dh.c
+++ b/libssh/dh.c
@@ -831,6 +831,7 @@ int ssh_get_pubkey_hash(SSH_SESSION *session, unsigned char **hash) {
ctx = md5_init();
if (ctx == NULL) {
+ SAFE_FREE(h);
return -1;
}