[Forensics-changes] [yara] 64/192: CritSection in try block and return value fixed
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:31:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.6.0
in repository yara.
commit 7e168cd2a344b206da799d1fd8344ac0dcdd4807
Author: Rastislav Masaryk <rmasaryk at eset.sk>
Date: Mon Nov 14 07:59:55 2016 +0100
CritSection in try block and return value fixed
---
threading.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/threading.c b/threading.c
index 5a65c2e..5479c20 100644
--- a/threading.c
+++ b/threading.c
@@ -40,8 +40,13 @@ int mutex_init(
MUTEX* mutex)
{
#if defined(_WIN32) || defined(__CYGWIN__)
- InitializeCriticalSection(mutex);
- return GetLastError();
+ __try {
+ InitializeCriticalSection(mutex);
+ return 0;
+ }
+ __except (STATUS_NO_MEMORY) {
+ return STATUS_NO_MEMORY;
+ }
#else
return pthread_mutex_init(mutex, NULL);
#endif
--
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