diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2002-07-07 22:10:15 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2002-07-07 22:10:15 +0000 |
commit | c51b924a80a17d6cf47c25c2c118385d4ecc87c8 (patch) | |
tree | 140f5252d5b8bc0aca22225c2323781d6af6e78d /ssh-dss.c | |
parent | 8abe736dd7a27e4c2a42351287bacfd80ec42a7c (diff) |
- 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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: ssh-dss.c,v 1.15 2002/06/23 03:30:17 deraadt Exp $"); | 26 | RCSID("$OpenBSD: ssh-dss.c,v 1.16 2002/07/04 04:15:33 deraadt Exp $"); |
27 | 27 | ||
28 | #include <openssl/bn.h> | 28 | #include <openssl/bn.h> |
29 | #include <openssl/evp.h> | 29 | #include <openssl/evp.h> |
@@ -85,6 +85,8 @@ ssh_dss_sign(Key *key, u_char **sigp, u_int *lenp, | |||
85 | *lenp = SIGBLOB_LEN; | 85 | *lenp = SIGBLOB_LEN; |
86 | if (sigp != NULL) | 86 | if (sigp != NULL) |
87 | *sigp = ret; | 87 | *sigp = ret; |
88 | else | ||
89 | xfree(ret); | ||
88 | } else { | 90 | } else { |
89 | /* ietf-drafts */ | 91 | /* ietf-drafts */ |
90 | buffer_init(&b); | 92 | buffer_init(&b); |
@@ -98,6 +100,8 @@ ssh_dss_sign(Key *key, u_char **sigp, u_int *lenp, | |||
98 | *lenp = len; | 100 | *lenp = len; |
99 | if (sigp != NULL) | 101 | if (sigp != NULL) |
100 | *sigp = ret; | 102 | *sigp = ret; |
103 | else | ||
104 | xfree(ret); | ||
101 | } | 105 | } |
102 | return 0; | 106 | return 0; |
103 | } | 107 | } |