[Forensics-changes] [yara] 298/415: Fix memory leak
Hilko Bengen
bengen at moszumanska.debian.org
Thu Apr 3 05:43:16 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch debian
in repository yara.
commit 45a6a96e09d7d68c29887dc6ad0cf247219ce2b4
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Sat Dec 7 18:14:58 2013 +0100
Fix memory leak
---
libyara/rules.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libyara/rules.c b/libyara/rules.c
index bfbf264..f40b58d 100644
--- a/libyara/rules.c
+++ b/libyara/rules.c
@@ -742,6 +742,10 @@ int yr_rules_define_string_variable(
if (strcmp(external->identifier, identifier) == 0)
{
external->type = EXTERNAL_VARIABLE_TYPE_MALLOC_STRING;
+
+ if (external->string != NULL)
+ yr_free(external->string);
+
external->string = yr_strdup(value);
break;
}
--
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