diff options
Diffstat (limited to 'g10')
-rw-r--r-- | g10/ChangeLog | 4 | ||||
-rw-r--r-- | g10/passphrase.c | 9 |
2 files changed, 10 insertions, 3 deletions
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 |