remove memory leaks

This commit is contained in:
Holger Vogt 2019-08-18 18:26:00 +02:00
parent afdd0fe85e
commit 88008af088
2 changed files with 7 additions and 2 deletions

View File

@ -142,8 +142,10 @@ struct dvec *EVTfindvec(
}
}
if(! found)
if(! found) {
tfree(name);
return(NULL);
}
/* Get the UDN type index */
udn_index = node_table[i]->udn_index;

View File

@ -134,8 +134,11 @@ MIFdelete(GENinstance *gen_inst)
}
/* Free the basic port structure allocated in MIFget_port */
num_port = here->conn[i]->size;
for (j = 0; j < num_port; j++)
for (j = 0; j < num_port; j++) {
/* Memory allocated in mif_inp2.c */
FREE(here->conn[i]->port[j]->type_str);
FREE(here->conn[i]->port[j]);
}
FREE(here->conn[i]->port);
}