diff options
author | Moritz Schulte <mo@g10code.com> | 2004-10-08 13:10:47 +0200 |
---|---|---|
committer | Moritz Schulte <mo@g10code.com> | 2004-10-08 13:10:47 +0200 |
commit | 6cb8f7ad4d19f7edf53d278b983d2b8c239c6575 (patch) | |
tree | 406ee2c39c8c19c0623b24a820c5b614df646351 | |
parent | (ccid_open_reader): Store the vendor ID. (diff) | |
download | gnupg2-6cb8f7ad4d19f7edf53d278b983d2b8c239c6575.tar.xz gnupg2-6cb8f7ad4d19f7edf53d278b983d2b8c239c6575.zip |
2004-10-08 Moritz Schulte <moritz@g10code.com>
* certchain.c (gpgsm_validate_chain): Do not use keydb_new() in
case the no_chain_validation-return-short-cut is used (fixes
memory leak).
-rw-r--r-- | sm/ChangeLog | 6 | ||||
-rw-r--r-- | sm/certchain.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sm/ChangeLog b/sm/ChangeLog index feef043ef..928611eb8 100644 --- a/sm/ChangeLog +++ b/sm/ChangeLog @@ -1,3 +1,9 @@ +2004-10-08 Moritz Schulte <moritz@g10code.com> + + * certchain.c (gpgsm_validate_chain): Do not use keydb_new() in + case the no_chain_validation-return-short-cut is used (fixes + memory leak). + 2004-10-04 Werner Koch <wk@g10code.com> * misc.c (setup_pinentry_env): Try hard to set a default for GPG_TTY. diff --git a/sm/certchain.c b/sm/certchain.c index ad30a36e1..c51327e0d 100644 --- a/sm/certchain.c +++ b/sm/certchain.c @@ -534,7 +534,7 @@ gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t r_exptime, int rc = 0, depth = 0, maxdepth; char *issuer = NULL; char *subject = NULL; - KEYDB_HANDLE kh = keydb_new (0); + KEYDB_HANDLE kh = NULL; ksba_cert_t subject_cert = NULL, issuer_cert = NULL; ksba_isotime_t current_time; ksba_isotime_t exptime; @@ -555,7 +555,8 @@ gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t r_exptime, log_info ("WARNING: bypassing certificate chain validation\n"); return 0; } - + + kh = keydb_new (0); if (!kh) { log_error (_("failed to allocated keyDB handle\n")); |