[Forensics-changes] [yara] 306/368: Fix memory leak

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:30:51 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 fd346a76943f1ddaecbed92ce86b8d58dbcc5d83
Author: plusvic <plusvic at gmail.com>
Date:   Tue Jun 7 18:42:37 2016 -0700

    Fix memory leak
---
 libyara/modules/pe.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
index 9cfbbf3..95c27c6 100644
--- a/libyara/modules/pe.c
+++ b/libyara/modules/pe.c
@@ -1008,8 +1008,11 @@ IMPORTED_FUNCTION* pe_parse_import_descriptor(
             yr_calloc(1, sizeof(IMPORTED_FUNCTION));
 
         if (imported_func == NULL)
+        {
+          yr_free(name);
           continue;
-
+        }
+ 
         imported_func->name = name;
         imported_func->ordinal = ordinal;
         imported_func->has_ordinal = has_ordinal;

-- 
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