Free only if it's possible to free

This commit is contained in:
AurelienUoU 2019-06-19 16:15:30 -06:00
parent 57a4ad1f99
commit ff00e4c79c
1 changed files with 2 additions and 1 deletions

View File

@ -185,7 +185,8 @@ void read_netlist(INP const char *net_file, INP const t_arch *arch,
*/
FreeTokens(&circuit_inputs);
FreeTokens(&circuit_outputs);
if (circuit_outputs)
FreeTokens(&circuit_outputs);
if (circuit_clocks)
FreeTokens(&circuit_clocks);
FreeNode(Top);