shithub: scc

Download patch

ref: 0521af76024d66c24768f7e8e3f1fbdc946fa142
parent: b83a1ff50ea37f05c4a7c605bbf070c4d90afcdf
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon May 9 04:49:06 EDT 2016

[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.

--- a/cc1/cpp.c
+++ b/cc1/cpp.c
@@ -593,6 +593,7 @@
 			return;
 		}
 		status = expr->sym->u.i != 0;
+		freetree(expr);
 	}
 
 	if (negate)