[svn] GnuPG - r5065 - trunk/tools

svn author wk cvs at cvs.gnupg.org
Tue Jul 7 12:29:52 CEST 2009


Author: wk
Date: 2009-07-07 12:29:52 +0200 (Tue, 07 Jul 2009)
New Revision: 5065

Modified:
   trunk/tools/gpg-connect-agent.c
Log:
Release session_env.


Modified: trunk/tools/gpg-connect-agent.c
===================================================================
--- trunk/tools/gpg-connect-agent.c	2009-07-07 10:02:41 UTC (rev 5064)
+++ trunk/tools/gpg-connect-agent.c	2009-07-07 10:29:52 UTC (rev 5065)
@@ -2081,11 +2081,6 @@
   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 @@
       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));




More information about the Gnupg-commits mailing list