[hackers] [scc] [cc1] Fix memory leak in cpp || Roberto E. Vargas Caballero
commit b69d387190663d6ca1b7f92daa1fa342b589a21e
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon May 9 08:49:06 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
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
_AT_@ -593,6 +593,7 @@ ifclause(int negate, int isifdef)
return;
}
status = expr->sym->u.i != 0;
+ freetree(expr);
}
if (negate)
Received on Mon May 09 2016 - 08:50:40 CEST
This archive was generated by hypermail 2.3.0
: Mon May 09 2016 - 09:00:16 CEST