From 25e80032bae82e2ed3628c69a5fff9afc6d77faf Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 17 Apr 2009 14:47:53 +0000 Subject: 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 --- libssh/dh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libssh/dh.c b/libssh/dh.c index ccfc6cdc..619a4d2a 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; } -- cgit