gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-291-g89c342d


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-291-g89c342d
Date: Sat, 03 Jul 2010 23:06:32 +0000

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 "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=89c342d9bb577ff901b658322cc177ff1dd4d11c

The branch, master has been updated
       via  89c342d9bb577ff901b658322cc177ff1dd4d11c (commit)
      from  c31afb30c2d030c2d865f7d3a6a60118315ac8d1 (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 89c342d9bb577ff901b658322cc177ff1dd4d11c
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Jul 4 01:03:47 2010 +0200

    Corrected locking usage in nettle's random subsystem.

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

Summary of changes:
 lib/nettle/rnd.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/nettle/rnd.c b/lib/nettle/rnd.c
index fe0696d..84ef1a8 100644
--- a/lib/nettle/rnd.c
+++ b/lib/nettle/rnd.c
@@ -41,8 +41,8 @@
 
 static void* rnd_mutex;
 
-#define RND_LOCK if (gnutls_mutex_lock(rnd_mutex)!=0) abort()
-#define RND_UNLOCK if (gnutls_mutex_unlock(rnd_mutex)!=0) abort()
+#define RND_LOCK if (gnutls_mutex_lock(&rnd_mutex)!=0) abort()
+#define RND_UNLOCK if (gnutls_mutex_unlock(&rnd_mutex)!=0) abort()
 
 enum {
        RANDOM_SOURCE_TRIVIA=0,
@@ -170,20 +170,20 @@ static void wrap_nettle_rnd_deinit(void* ctx)
        RND_LOCK;
        close(device_fd);
        RND_UNLOCK;
+
+       gnutls_mutex_deinit(&rnd_mutex);
+       rnd_mutex = NULL;
 }
 
 static int wrap_nettle_rnd_init(void **ctx)
 {
 int ret;
 
-       if (gnutls_mutex_init)
+       ret = gnutls_mutex_init(&rnd_mutex);
+       if (ret < 0)
          {
-           ret = gnutls_mutex_init(&rnd_mutex);
-           if (ret < 0)
-             {
-               gnutls_assert();
-               return ret;
-             }
+           gnutls_assert();
+           return ret;
          }
 
        yarrow256_init(&yctx, SOURCES, ysources);


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]