add guards against freee of null pointers in name_nodes_of_pins_labels_and_propagate()

This commit is contained in:
stefan schippers 2023-05-21 13:47:05 +02:00
parent 5c22d26072
commit 313f5898eb
1 changed files with 7 additions and 7 deletions

View File

@ -1004,14 +1004,14 @@ static int name_nodes_of_pins_labels_and_propagate()
err |= name_attached_inst(i, x0, y0, sqx, sqy, inst[i].node[0]);
} /* if(type && ... */
} /* for(i=0;i<instances... */
my_free(_ALLOC_ID_, &dir);
my_free(_ALLOC_ID_, &type);
my_free(_ALLOC_ID_, &global_node);
if(dir) my_free(_ALLOC_ID_, &dir);
if(type) my_free(_ALLOC_ID_, &type);
if(global_node) my_free(_ALLOC_ID_, &global_node);
if(for_netlist) {
my_free(_ALLOC_ID_, &sig_type);
my_free(_ALLOC_ID_, &verilog_type);
my_free(_ALLOC_ID_, &value);
my_free(_ALLOC_ID_, &class);
if(sig_type) my_free(_ALLOC_ID_, &sig_type);
if(verilog_type) my_free(_ALLOC_ID_, &verilog_type);
if(value) my_free(_ALLOC_ID_, &value);
if(class) my_free(_ALLOC_ID_, &class);
}
return err;
}