[git] GnuPG - branch, master, updated. gnupg-2.1.14-9-g0c1fd4e

by NIIBE Yutaka cvs at cvs.gnupg.org
Tue Jul 19 04:09:22 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  0c1fd4e9884ed7c1edd1819762b9e8a77f606ed3 (commit)
      from  f474249366e8e143c8e6eb7f7b1a74056e46fa1f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0c1fd4e9884ed7c1edd1819762b9e8a77f606ed3
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Jul 19 10:53:39 2016 +0900

    scd: Fix race conditions for release_application.
    
    * scd/command.c (do_reset, cmd_restart): Reset app_ctx before calling
    release_application.
    
    --
    
    Thanks to Ben Warren for the report.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/scd/command.c b/scd/command.c
index a4a2ba0..5842ee7 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -261,6 +261,7 @@ do_reset (ctrl_t ctrl, int send_reset)
   int vrdr = ctrl->server_local->vreader_idx;
   int slot;
   int err;
+  struct app_ctx_s *app = ctrl->app_ctx;
 
   if (!(vrdr == -1 || (vrdr >= 0 && vrdr < DIM(vreader_table))))
     BUG ();
@@ -268,10 +269,10 @@ do_reset (ctrl_t ctrl, int send_reset)
   /* If there is an active application, release it.  Tell all other
      sessions using the same application to release the
      application.  */
-  if (ctrl->app_ctx)
+  if (app)
     {
-      release_application (ctrl->app_ctx);
       ctrl->app_ctx = NULL;
+      release_application (app);
       if (send_reset)
         {
           struct server_local_s *sl;
@@ -1742,13 +1743,14 @@ static gpg_error_t
 cmd_restart (assuan_context_t ctx, char *line)
 {
   ctrl_t ctrl = assuan_get_pointer (ctx);
+  struct app_ctx_s *app = ctrl->app_ctx;
 
   (void)line;
 
-  if (ctrl->app_ctx)
+  if (app)
     {
-      release_application (ctrl->app_ctx);
       ctrl->app_ctx = NULL;
+      release_application (app);
     }
   if (locked_session && ctrl->server_local == locked_session)
     {

-----------------------------------------------------------------------

Summary of changes:
 scd/command.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list