aboutsummaryrefslogtreecommitdiffstats
path: root/agent/protect-tool.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--agent/protect-tool.c5
1 files changed, 4 insertions, 1 deletions
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