remove memory leaks
This commit is contained in:
parent
afdd0fe85e
commit
88008af088
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue