diff options
author | 2002-07-04 04:15:33 +0000 | |
---|---|---|
committer | 2002-07-04 04:15:33 +0000 | |
commit | dea7d00eafb9cf6cfeade320ab261336ed45e994 (patch) | |
tree | f49584382c7ea08347623267b65ec4ecdc3b9fbe /usr.bin/ssh/ssh-dss.c | |
parent | catch malloc failures, my changes; found by cloder@acm.org (diff) | |
download | wireguard-openbsd-dea7d00eafb9cf6cfeade320ab261336ed45e994.tar.xz wireguard-openbsd-dea7d00eafb9cf6cfeade320ab261336ed45e994.zip |
patch memory leaks; grendel@zeitbombe.org
Diffstat (limited to 'usr.bin/ssh/ssh-dss.c')
-rw-r--r-- | usr.bin/ssh/ssh-dss.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-dss.c b/usr.bin/ssh/ssh-dss.c index dbf8465bae5..0215f1c9a8b 100644 --- a/usr.bin/ssh/ssh-dss.c +++ b/usr.bin/ssh/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; } |