aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--agent/ChangeLog4
-rw-r--r--agent/protect-tool.c5
-rw-r--r--g10/ChangeLog4
-rw-r--r--g10/passphrase.c9
-rw-r--r--sm/ChangeLog6
-rw-r--r--sm/certdump.c11
-rw-r--r--sm/qualified.c18
-rw-r--r--tools/ChangeLog4
-rw-r--r--tools/symcryptrun.c7
9 files changed, 54 insertions, 14 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index ce8b874b1..cab775385 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,7 @@
+2007-05-19 Marcus Brinkmann <[email protected]>
+
+ * protect-tool.c (get_passphrase): Free ORIG_CODESET on error.
+
2007-05-14 Werner Koch <[email protected]>
* protect.c (make_shadow_info): Replace sprintf by smklen.
diff --git a/agent/protect-tool.c b/agent/protect-tool.c
index 8496601b5..f7e2d603b 100644
--- a/agent/protect-tool.c
+++ b/agent/protect-tool.c
@@ -1183,7 +1183,10 @@ get_passphrase (int promptno, int opt_check)
/* We only switch when we are able to restore the codeset later. */
orig_codeset = xstrdup (orig_codeset);
if (!bind_textdomain_codeset (PACKAGE_GT, "utf-8"))
- orig_codeset = NULL;
+ {
+ xfree (orig_codeset);
+ orig_codeset = NULL;
+ }
}
#endif
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 93fe77d2b..a6b6cb5b3 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,7 @@
+2007-05-19 Marcus Brinkmann <[email protected]>
+
+ * passphrase.c (passphrase_get): Free ORIG_CODESET on error.
+
2007-05-16 Werner Koch <[email protected]>
* sig-check.c (check_backsig): Check the digest algorithm before
diff --git a/g10/passphrase.c b/g10/passphrase.c
index 122b251dd..83606b8ff 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -1,6 +1,6 @@
/* passphrase.c - Get a passphrase
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- * 2005, 2006 Free Software Foundation, Inc.
+ * 2005, 2006, 2007 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -289,8 +289,11 @@ passphrase_get ( u32 *keyid, int mode, const char *cacheid,
if (orig_codeset)
{ /* We only switch when we are able to restore the codeset later. */
orig_codeset = xstrdup (orig_codeset);
- if (!bind_textdomain_codeset (PACKAGE, "utf-8"))
- orig_codeset = NULL;
+ if (!bind_textdomain_codeset (PACKAGE_GT, "utf-8"))
+ {
+ xfree (orig_codeset);
+ orig_codeset = NULL;
+ }
}
#endif
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)
diff --git a/tools/ChangeLog b/tools/ChangeLog
index cd403e2bf..6ee23ccc5 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,7 @@
+2007-05-19 Marcus Brinkmann <[email protected]>
+
+ * symcryptrun.c (confucius_get_pass): Free ORIG_CODESET on error.
+
2007-05-08 Werner Koch <[email protected]>
* sockprox.c: New. It needs to be build manually. By Moritz
diff --git a/tools/symcryptrun.c b/tools/symcryptrun.c
index b45e356a9..119121208 100644
--- a/tools/symcryptrun.c
+++ b/tools/symcryptrun.c
@@ -1,5 +1,5 @@
/* symcryptrun.c - Tool to call simple symmetric encryption tools.
- * Copyright (C) 2005 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2007 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -460,7 +460,10 @@ confucius_get_pass (const char *cacheid, int again, int *canceled)
/* We only switch when we are able to restore the codeset later. */
orig_codeset = xstrdup (orig_codeset);
if (!bind_textdomain_codeset (PACKAGE_GT, "utf-8"))
- orig_codeset = NULL;
+ {
+ xfree (orig_codeset);
+ orig_codeset = NULL;
+ }
}
#endif