[Forensics-changes] [yara] 318/368: Invoke yr_modules_unload_all from exec.c
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:30:52 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 5ec8cbc07a2fe1bb05eebe7ff604a0366e2aa2c4
Author: plusvic <plusvic at gmail.com>
Date: Wed Jun 15 13:29:07 2016 +0200
Invoke yr_modules_unload_all from exec.c
As modules are loaded from exec.c it makes more sense to unload them there too.
---
libyara/exec.c | 2 ++
libyara/rules.c | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/libyara/exec.c b/libyara/exec.c
index a06688f..0ae4bc0 100644
--- a/libyara/exec.c
+++ b/libyara/exec.c
@@ -1138,6 +1138,8 @@ int yr_execute_code(
ip++;
}
+ yr_modules_unload_all(context);
yr_free(stack);
+
return result;
}
diff --git a/libyara/rules.c b/libyara/rules.c
index e44d1de..19080e5 100644
--- a/libyara/rules.c
+++ b/libyara/rules.c
@@ -34,7 +34,6 @@ limitations under the License.
#include <yara/globals.h>
#include <yara/libyara.h>
#include <yara/scan.h>
-#include <yara/modules.h>
#include "exception.h"
@@ -487,8 +486,6 @@ _exit:
_yr_rules_clean_matches(rules, &context);
- yr_modules_unload_all(&context);
-
if (context.matches_arena != NULL)
yr_arena_destroy(context.matches_arena);
--
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