[Crosstoolchain-logs] [device-tree-compiler] 188/198: convert-dtsv0-lexer.l: fix memory leak

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:07:08 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.

commit 1074ee54b63f85603e0fc91614eebda9d7409035
Author: David Gibson <david at gibson.dropbear.id.au>
Date:   Sun Jul 24 00:50:30 2016 +1000

    convert-dtsv0-lexer.l: fix memory leak
    
    CID 132822 (#1 of 1): Resource leak (RESOURCE_LEAK)
    9. leaked_storage: Variable newname going out of scope leaks the storage it points to
    
    Signed-off-by: Jean-Christophe Dubois <jcd at tribudubois.net>
    [dwg: Removed unnecessary hunk]
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 convert-dtsv0-lexer.l | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/convert-dtsv0-lexer.l b/convert-dtsv0-lexer.l
index 259e527..aa32dc8 100644
--- a/convert-dtsv0-lexer.l
+++ b/convert-dtsv0-lexer.l
@@ -223,6 +223,8 @@ static void convert_file(const char *fname)
 
 	while(yylex())
 		;
+
+	free(newname);
 }
 
 int main(int argc, char *argv[])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list