summaryrefslogtreecommitdiff
path: root/ssh-dss.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-07-07 22:10:15 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-07-07 22:10:15 +0000
commitc51b924a80a17d6cf47c25c2c118385d4ecc87c8 (patch)
tree140f5252d5b8bc0aca22225c2323781d6af6e78d /ssh-dss.c
parent8abe736dd7a27e4c2a42351287bacfd80ec42a7c (diff)
downloadopenssh-git-c51b924a80a17d6cf47c25c2c118385d4ecc87c8.tar.gz
- deraadt@cvs.openbsd.org 2002/07/04 04:15:33
[key.c monitor_wrap.c sftp-glob.c ssh-dss.c ssh-rsa.c] patch memory leaks; grendel@zeitbombe.org
Diffstat (limited to 'ssh-dss.c')
-rw-r--r--ssh-dss.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ssh-dss.c b/ssh-dss.c
index dbf8465b..0215f1c9 100644
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-dss.c,v 1.15 2002/06/23 03:30:17 deraadt Exp $");
+RCSID("$OpenBSD: ssh-dss.c,v 1.16 2002/07/04 04:15:33 deraadt Exp $");
#include <openssl/bn.h>
#include <openssl/evp.h>
@@ -85,6 +85,8 @@ ssh_dss_sign(Key *key, u_char **sigp, u_int *lenp,
*lenp = SIGBLOB_LEN;
if (sigp != NULL)
*sigp = ret;
+ else
+ xfree(ret);
} else {
/* ietf-drafts */
buffer_init(&b);
@@ -98,6 +100,8 @@ ssh_dss_sign(Key *key, u_char **sigp, u_int *lenp,
*lenp = len;
if (sigp != NULL)
*sigp = ret;
+ else
+ xfree(ret);
}
return 0;
}