aboutsummaryrefslogtreecommitdiffstats
path: root/sm
diff options
context:
space:
mode:
Diffstat (limited to 'sm')
-rw-r--r--sm/ChangeLog6
-rw-r--r--sm/certdump.c11
-rw-r--r--sm/qualified.c18
3 files changed, 27 insertions, 8 deletions
diff --git a/sm/ChangeLog b/sm/ChangeLog
index e2b7796cf..d4af923a2 100644
--- a/sm/ChangeLog
+++ b/sm/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-18 Marcus Brinkmann <[email protected]>
+
+ * qualified.c (gpgsm_qualified_consent,
+ gpgsm_not_qualified_warning): Free ORIG_CODESET on error.
+ * certdump.c (gpgsm_format_keydesc): Likewise.
+
2007-05-07 Werner Koch <[email protected]>
* certcheck.c (MY_GCRY_PK_ECDSA): New.
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)
{
diff --git a/sm/qualified.c b/sm/qualified.c
index 920d15f4a..4a9c81ddb 100644
--- a/sm/qualified.c
+++ b/sm/qualified.c
@@ -1,5 +1,5 @@
/* qualified.c - Routines related to qualified signatures
- * Copyright (C) 2005 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2007 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -216,7 +216,10 @@ gpgsm_qualified_consent (ctrl_t ctrl, 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
@@ -313,7 +316,10 @@ gpgsm_not_qualified_warning (ctrl_t ctrl, 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
@@ -330,9 +336,11 @@ gpgsm_not_qualified_warning (ctrl_t ctrl, 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);
xfree (subject);
if (err)