[Forensics-changes] [yara] 66/368: Move this check earlier.

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:30:12 UTC 2017


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag v3.5.0
in repository yara.

commit a0f89aafede5950d63cbd5239d37cbd3a1f6e0bd
Author: Wesley Shields <wxs at atarininja.org>
Date:   Wed Sep 23 06:18:46 2015 -0400

    Move this check earlier.
---
 libyara/libyara.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libyara/libyara.c b/libyara/libyara.c
index 63b146c..f47fe6a 100644
--- a/libyara/libyara.c
+++ b/libyara/libyara.c
@@ -143,6 +143,9 @@ YR_API int yr_finalize(void)
 {
   yr_re_finalize_thread();
 
+  if (--init_count > 0)
+    return ERROR_SUCCESS;
+
   #ifdef HAVE_LIBCRYPTO
   int i;
   for (i = 0; i < CRYPTO_num_locks(); i ++)
@@ -150,9 +153,6 @@ YR_API int yr_finalize(void)
   OPENSSL_free(locks);
   #endif
 
-  if (--init_count > 0)
-    return ERROR_SUCCESS;
-
   #ifdef _WIN32
   TlsFree(tidx_key);
   TlsFree(recovery_state_key);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git



More information about the forensics-changes mailing list