summaryrefslogtreecommitdiffstats
path: root/sm/certdump.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <mb@g10code.com>2007-05-19 00:58:59 +0200
committerMarcus Brinkmann <mb@g10code.com>2007-05-19 00:58:59 +0200
commitb9042f1cecce76e9a174013f3def0bc7aa640cc3 (patch)
tree396666250d6889f135ea97c15b6097e4877527c9 /sm/certdump.c
parentFix for bug 797. (diff)
downloadgnupg2-b9042f1cecce76e9a174013f3def0bc7aa640cc3.tar.xz
gnupg2-b9042f1cecce76e9a174013f3def0bc7aa640cc3.zip
agent/
2007-05-19 Marcus Brinkmann <marcus@g10code.de> * protect-tool.c (get_passphrase): Free ORIG_CODESET on error. g10/ 2007-05-19 Marcus Brinkmann <marcus@g10code.de> * passphrase.c (passphrase_get): Free ORIG_CODESET on error. sm/ 2007-05-18 Marcus Brinkmann <marcus@g10code.de> * qualified.c (gpgsm_qualified_consent, gpgsm_not_qualified_warning): Free ORIG_CODESET on error. * certdump.c (gpgsm_format_keydesc): Likewise. tools/ 2007-05-19 Marcus Brinkmann <marcus@g10code.de> * symcryptrun.c (confucius_get_pass): Free ORIG_CODESET on error.
Diffstat (limited to 'sm/certdump.c')
-rw-r--r--sm/certdump.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sm/certdump.c b/sm/certdump.c
index d697733be..f5fff38c4 100644
--- a/sm/certdump.c
+++ b/sm/certdump.c
@@ -921,7 +921,10 @@ gpgsm_format_keydesc (ksba_cert_t cert)
bother printing a diagnostic here. */
orig_codeset = xstrdup (orig_codeset);
if (!bind_textdomain_codeset (PACKAGE_GT, "utf-8"))
- orig_codeset = NULL;
+ {
+ xfree (orig_codeset);
+ orig_codeset = NULL;
+ }
}
#endif
@@ -938,9 +941,11 @@ gpgsm_format_keydesc (ksba_cert_t cert)
#ifdef ENABLE_NLS
if (orig_codeset)
- bind_textdomain_codeset (PACKAGE_GT, orig_codeset);
+ {
+ bind_textdomain_codeset (PACKAGE_GT, orig_codeset);
+ xfree (orig_codeset);
+ }
#endif
- xfree (orig_codeset);
if (rc < 0)
{