aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/pack.cc
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-06-25 15:52:55 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-06-25 15:52:55 +0200
commit6de8b4ef7d5b6d04b6292e86c6a431c6985cc392 (patch)
tree7eed7b78d4b8a2c30508519ecb76b32715965d24 /ice40/pack.cc
parentfb5fb497b5c81d3adab8e210a4942e34c5bf8e9f (diff)
downloadnextpnr-6de8b4ef7d5b6d04b6292e86c6a431c6985cc392.tar.gz
nextpnr-6de8b4ef7d5b6d04b6292e86c6a431c6985cc392.tar.bz2
nextpnr-6de8b4ef7d5b6d04b6292e86c6a431c6985cc392.zip
some more memory leaks
Diffstat (limited to 'ice40/pack.cc')
-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)