aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
Diffstat (limited to 'ice40')
-rw-r--r--ice40/pack.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc
index 85c1af8c..2378a625 100644
--- a/ice40/pack.cc
+++ b/ice40/pack.cc
@@ -276,11 +276,17 @@ static void pack_constants(Context *ctx)
if (gnd_used) {
ctx->cells[gnd_cell->name] = gnd_cell;
ctx->nets[gnd_net->name] = gnd_net;
+ } else {
+ delete gnd_net;
+ delete gnd_cell;
}
if (vcc_used) {
ctx->cells[vcc_cell->name] = vcc_cell;
ctx->nets[vcc_net->name] = vcc_net;
+ } else {
+ delete vcc_net;
+ delete vcc_cell;
}
for (auto dn : dead_nets)