[Forensics-changes] [yara] 269/368: Fix memory leaks in tests
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:30:47 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 5b5d2807440d8e46033e278807574068a07b5505
Author: plusvic <plusvic at gmail.com>
Date: Tue May 10 15:29:32 2016 +0200
Fix memory leaks in tests
---
tests/util.c | 2 ++
tests/util.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/tests/util.c b/tests/util.c
index 495927c..a211f54 100644
--- a/tests/util.c
+++ b/tests/util.c
@@ -191,6 +191,8 @@ int capture_string(
exit(EXIT_FAILURE);
}
+ yr_rules_destroy(rules);
+
return f.found;
}
diff --git a/tests/util.h b/tests/util.h
index 80919e7..ca8b815 100644
--- a/tests/util.h
+++ b/tests/util.h
@@ -77,6 +77,7 @@ int read_file(
__FILE__, __LINE__, filename); \
exit(EXIT_FAILURE); \
} \
+ free(buf); \
} while (0);
#define assert_false_rule(rule, string) \
@@ -112,6 +113,7 @@ int read_file(
__FILE__, __LINE__, filename); \
exit(EXIT_FAILURE); \
} \
+ free(buf); \
} while (0);
#define assert_syntax_correct(rule) do { \
--
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