[coreboot-gerrit] Patch set updated for coreboot: 2e7ff2b util/sconfig/main.c: Free memory pointed to by `devtree`

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Tue Aug 5 08:07:07 CEST 2014


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6486

-gerrit

commit 2e7ff2b28a4a1615280b8a769c8707b2caf7b1a9
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Mon Aug 4 08:15:03 2014 +0200

    util/sconfig/main.c: Free memory pointed to by `devtree`
    
    Cppcheck 1.65 reports the error below.
    
    	[main.c:709]: (error) Memory leak: devtree
    
    So free the memory space pointed to by `devtree` to fix the memory
    leak.
    
    Change-Id: Ibcd93057e88544ea900d9b6261c907baa751b2f1
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 util/sconfig/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index 44d4911..91fb8cb 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -609,6 +609,7 @@ int main(int argc, char** argv) {
 		perror(NULL);
 		exit(1);
 	}
+	free(devtree);
 
 	yyrestart(filec);
 



More information about the coreboot-gerrit mailing list