fix bug no. 394, reported by Yurii Demchyna

This commit is contained in:
Holger Vogt 2019-02-26 20:21:38 +01:00
parent 54d4d9747a
commit 7bb8049d2a
2 changed files with 3 additions and 2 deletions

View File

@ -846,7 +846,7 @@ MIFget_port(
/* store the port type information in the instance struct */
fast->conn[conn_num]->port[port_num]->type = def_port_type;
fast->conn[conn_num]->port[port_num]->type_str = def_port_type_str;
fast->conn[conn_num]->port[port_num]->type_str = copy(def_port_type_str);
/* check for a leading tilde on digital ports */
if(*next_token_type == MIF_TILDE_TOK) {

View File

@ -528,7 +528,8 @@ MIFunsetup(GENmodel *inModel,CKTcircuit *ckt)
tfree(here->conn[i]->port[j]->partial);
tfree(here->conn[i]->port[j]->ac_gain);
tfree(here->conn[i]->port[j]->smp_data.input);
/* free memory allocated in mif_inp2.c */
tfree(here->conn[i]->port[j]->type_str);
} /* end for number of ports */
} /* end for number of connections */
/* free memory allocated by cm_analog_alloc and cm_analog_converge */