aboutsummaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
Diffstat (limited to 'agent')
-rw-r--r--agent/ChangeLog8
-rw-r--r--agent/preset-passphrase.c8
2 files changed, 11 insertions, 5 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index 97c7741ac..19f711e23 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,9 @@
+2006-07-31 Werner Koch <[email protected]>
+
+ * preset-passphrase.c (make_hexstring): For conistency use
+ xtrymalloc and changed caller to use xfree. Fixed function
+ comment.
+
2006-07-29 Marcus Brinkmann <[email protected]>
* preset-passphrase.c (preset_passphrase): Do not strip off last
@@ -23,7 +29,7 @@
2006-06-26 Werner Koch <[email protected]>
- * gpg-agent.c (handle_signal): Print infor for SIGUSR2 only in
+ * gpg-agent.c (handle_signal): Print info for SIGUSR2 only in
verbose mode.
2006-06-22 Werner Koch <[email protected]>
diff --git a/agent/preset-passphrase.c b/agent/preset-passphrase.c
index f876b0647..8f8f60e76 100644
--- a/agent/preset-passphrase.c
+++ b/agent/preset-passphrase.c
@@ -152,8 +152,8 @@ map_spwq_error (int err)
}
-/* Percent-Escape special characters. The string is valid until the
- next invocation of the function. */
+/* Convert the string SRC into HEX encoding. Caller needs to xfree
+ the returned string. */
static char *
make_hexstring (const char *src)
{
@@ -161,7 +161,7 @@ make_hexstring (const char *src)
char *dst;
char *res;
- res = dst = malloc (len);
+ res = dst = xtrymalloc (len);
if (!dst)
{
log_error ("can not escape string: %s\n",
@@ -225,7 +225,7 @@ preset_passphrase (const char *keygrip)
rc = asprintf (&line, "PRESET_PASSPHRASE %s -1 %s\n", keygrip,
passphrase_esc);
wipememory (passphrase_esc, strlen (passphrase_esc));
- free (passphrase_esc);
+ xfree (passphrase_esc);
if (rc < 0)
{