diff options
author | Moritz Schulte <mo@g10code.com> | 2003-04-27 20:19:30 +0000 |
---|---|---|
committer | Moritz Schulte <mo@g10code.com> | 2003-04-27 20:19:30 +0000 |
commit | 65430b1cf8bbafa25bf13af6371950d7e000e294 (patch) | |
tree | 460cc5c82d345576e5c5ba282395f0a64dd83e1a /cipher | |
parent | 456072e3c00c9b4a2702857d2abdab7cf42b074e (diff) | |
download | libgcrypt-65430b1cf8bbafa25bf13af6371950d7e000e294.tar.gz |
2003-04-27 Moritz Schulte <moritz@g10code.com>
* pubkey.c (gcry_pk_genkey): Release sexp after extracted data has
been used.
Diffstat (limited to 'cipher')
-rw-r--r-- | cipher/ChangeLog | 3 | ||||
-rw-r--r-- | cipher/pubkey.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog index a4b45e24..e128d3e4 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,5 +1,8 @@ 2003-04-27 Moritz Schulte <moritz@g10code.com> + * pubkey.c (gcry_pk_genkey): Release sexp after extracted data has + been used. + * md.c (gcry_md_get_algo_dlen): Simplified, simply call md_digest_length to do the job. diff --git a/cipher/pubkey.c b/cipher/pubkey.c index 5a4a91b6..5ee00d73 100644 --- a/cipher/pubkey.c +++ b/cipher/pubkey.c @@ -1835,8 +1835,6 @@ gcry_pk_genkey (GCRY_SEXP *r_key, GCRY_SEXP s_parms) char buf[50]; name = gcry_sexp_nth_data (l2, 1, &n); - gcry_sexp_release (l2); - l2 = NULL; if ((! name) || (n >= DIM (buf) - 1)) rc = GCRYERR_INV_OBJ; /* no value or value too large */ else @@ -1845,6 +1843,8 @@ gcry_pk_genkey (GCRY_SEXP *r_key, GCRY_SEXP s_parms) buf[n] = 0; use_e = strtoul (buf, NULL, 0); } + gcry_sexp_release (l2); + l2 = NULL; } else use_e = 65537; /* not given, use the value generated by old versions. */ |