aboutsummaryrefslogtreecommitdiffstats
path: root/g10/cpr.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/cpr.c')
-rw-r--r--g10/cpr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/g10/cpr.c b/g10/cpr.c
index 5a39913c5..002656b82 100644
--- a/g10/cpr.c
+++ b/g10/cpr.c
@@ -527,7 +527,11 @@ do_get_from_fd ( const char *keyword, int hidden, int getbool )
write_status (STATUS_GOT_IT);
if (getbool) /* Fixme: is this correct??? */
- return (string[0] == 'Y' || string[0] == 'y') ? "" : NULL;
+ {
+ char *rv = (string[0] == 'Y' || string[0] == 'y') ? "" : NULL;
+ xfree (string);
+ return rv;
+ }
return string;
}