diff options
author | Werner Koch <wk@gnupg.org> | 2009-07-07 12:29:52 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2009-07-07 12:29:52 +0200 |
commit | e1f6e32da083dabdd69667e51ad73b9c3fb2aa45 (patch) | |
tree | 0e0cce633168679eae32090de564cef09f0c2d65 /tools/gpg-connect-agent.c | |
parent | Reworked passing of envars to Pinentry. (diff) | |
download | gnupg2-e1f6e32da083dabdd69667e51ad73b9c3fb2aa45.tar.xz gnupg2-e1f6e32da083dabdd69667e51ad73b9c3fb2aa45.zip |
Release session_env.
Diffstat (limited to '')
-rw-r--r-- | tools/gpg-connect-agent.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c index 90f54a44d..2bea98d8d 100644 --- a/tools/gpg-connect-agent.c +++ b/tools/gpg-connect-agent.c @@ -2081,11 +2081,6 @@ start_agent (void) assuan_context_t ctx; session_env_t session_env; - session_env = session_env_new (); - if (!session_env) - log_fatal ("error allocating session environment block: %s\n", - strerror (errno)); - infostr = getenv ("GPG_AGENT_INFO"); if (!infostr || !*infostr) { @@ -2174,8 +2169,14 @@ start_agent (void) exit (1); } + session_env = session_env_new (); + if (!session_env) + log_fatal ("error allocating session environment block: %s\n", + strerror (errno)); + rc = send_pinentry_environment (ctx, GPG_ERR_SOURCE_DEFAULT, NULL, NULL, session_env); + session_env_release (session_env); if (rc) { log_error (_("error sending standard options: %s\n"), gpg_strerror (rc)); |