commit b69d387190663d6ca1b7f92daa1fa342b589a21e
Author: Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Mon May 9 08:49:06 2016 +0200
Commit: Roberto E. Vargas Caballero <[email protected]>
CommitDate: Mon May 9 08:49:06 2016 +0200
[cc1] Fix memory leak in cpp
A expression is created in every ifdef, but this expressions
is only interesting for the true value, so after evaluating it
we must free it because it is not going to be used anymore.
diff --git a/cc1/cpp.c b/cc1/cpp.c
index 3707a46..af4f344 100644
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
@@ -593,6 +593,7 @@ ifclause(int negate, int isifdef)
return;
}
status = expr->sym->u.i != 0;
+ freetree(expr);
}
if (negate)