aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2011-01-06 14:31:54 +0100
committerAndreas Schneider <asn@cynapses.org>2011-01-06 14:32:39 +0100
commit6b27966c9c998ff9f66722579d7d44f9e53d5737 (patch)
treebfdfec85dc2b6a14f510696c8455ecd957f98f29 /src
parenta016d356fac59e010bef036bb7696b311bbd642a (diff)
downloadlibssh-6b27966c9c998ff9f66722579d7d44f9e53d5737.tar.gz
libssh-6b27966c9c998ff9f66722579d7d44f9e53d5737.tar.xz
libssh-6b27966c9c998ff9f66722579d7d44f9e53d5737.zip
keys: Fixed memory leaks in session signing.
Found by cppcheck - http://test.libssh.org/cppcheck-analyzer/
Diffstat (limited to 'src')
-rw-r--r--src/keys.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/keys.c b/src/keys.c
index 7b82d95f..7512e9a1 100644
--- a/src/keys.c
+++ b/src/keys.c
@@ -1324,6 +1324,7 @@ ssh_string ssh_do_sign(ssh_session session, ssh_buffer sigbuf,
sign->dsa_sign = NULL;
break;
default:
+ signature_free(sign);
return NULL;
}
#ifdef HAVE_LIBGCRYPT
@@ -1481,6 +1482,7 @@ ssh_string ssh_sign_session_id(ssh_session session, ssh_private_key privatekey)
sign->dsa_sign = NULL;
break;
default:
+ signature_free(sign);
return NULL;
}