[PATCH 3/4] tools/cpu/nios2/ptf.c: Fix leak of memory pointed to by new_prefix

Joel Sherrill joel.sherrill at oarcorp.com
Tue Sep 1 21:40:53 UTC 2015


Updates #2405.
---
 tools/cpu/nios2/ptf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/cpu/nios2/ptf.c b/tools/cpu/nios2/ptf.c
index 7a31c11..2b9448c 100644
--- a/tools/cpu/nios2/ptf.c
+++ b/tools/cpu/nios2/ptf.c
@@ -578,6 +578,7 @@ void ptf_printf(FILE *s, struct ptf *tree, char *prefix)
         fputs(new_prefix, s);
         fputs("\n", s);
         ptf_printf(s, leaf->sub, new_prefix);
+	free(new_prefix);
         break;
       };
 
-- 
1.8.3.1



More information about the devel mailing list