From: Nikos Mavrogiannopoulos Date: Tue, 23 Aug 2011 07:45:33 +0000 (+0200) Subject: unlock rnd mutex on error. X-Git-Tag: gnutls_3_0_2~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e5ae673bb3dcadc4897a08009ffff947988d9b5;p=thirdparty%2Fgnutls.git unlock rnd mutex on error. --- diff --git a/lib/nettle/rnd.c b/lib/nettle/rnd.c index 789eac0a1c..b3e18ac1f6 100644 --- a/lib/nettle/rnd.c +++ b/lib/nettle/rnd.c @@ -448,6 +448,7 @@ wrap_nettle_rnd (void *_ctx, int level, void *data, size_t datasize) ret = do_trivia_source (0); if (ret < 0) { + RND_UNLOCK; gnutls_assert (); return ret; } @@ -455,6 +456,7 @@ wrap_nettle_rnd (void *_ctx, int level, void *data, size_t datasize) ret = do_device_source (0); if (ret < 0) { + RND_UNLOCK; gnutls_assert (); return ret; }