[git] GPG-ERROR - branch, master, updated. libgpg-error-1.15-3-gc307e1f

by Werner Koch cvs at cvs.gnupg.org
Fri Sep 12 12:12:18 CEST 2014


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 "Error codes used by GnuPG et al.".

The branch, master has been updated
       via  c307e1f801cd9a25c4a5b9a90073362219d52ee6 (commit)
      from  e1882ee8c541020ec590bf096508ca5b6d2ab944 (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 c307e1f801cd9a25c4a5b9a90073362219d52ee6
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Sep 12 12:03:17 2014 +0200

    Fix es_fclose for streams opened with "samethread".
    
    * src/estream.c (destroy_stream_lock): New.
    (es_create, do_close): Use new wrapper function.

diff --git a/src/estream.c b/src/estream.c
index d16938e..1bff535 100644
--- a/src/estream.c
+++ b/src/estream.c
@@ -343,6 +343,18 @@ init_stream_lock (estream_t _GPGRT__RESTRICT stream)
 
 
 static void
+destroy_stream_lock (estream_t _GPGRT__RESTRICT stream)
+{
+  if (!stream->intern->samethread)
+    {
+      dbg_lock_1 ("enter destroy_stream_lock for %p\n", stream);
+      _gpgrt_lock_destroy (&stream->intern->lock);
+      dbg_lock_1 ("leave destroy_stream_lock for %p\n", stream);
+    }
+}
+
+
+static void
 lock_stream (estream_t _GPGRT__RESTRICT stream)
 {
   if (!stream->intern->samethread)
@@ -1821,7 +1833,7 @@ es_create (estream_t *stream, void *cookie, es_syshd_t *syshd,
       if (stream_new)
 	{
 	  es_deinitialize (stream_new);
-          _gpgrt_lock_destroy (&stream_new->intern->lock);
+          destroy_stream_lock (stream_new);
 	  mem_free (stream_new->intern);
 	  mem_free (stream_new);
 	}
@@ -1850,7 +1862,7 @@ do_close (estream_t stream, int with_locked_list)
           stream->intern->onclose = tmp;
         }
       err = es_deinitialize (stream);
-      _gpgrt_lock_destroy (&stream->intern->lock);
+      destroy_stream_lock (stream);
       mem_free (stream->intern);
       mem_free (stream);
     }

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

Summary of changes:
 src/estream.c |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Error codes used by GnuPG et al.
http://git.gnupg.org




More information about the Gnupg-commits mailing list