commit b69d387190663d6ca1b7f92daa1fa342b589a21e
parent c0b446c8b817e90d6d1d978d89bba51f80e56d3a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 9 May 2016 08:49:06 +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.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git 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)