inpcom.c, introduce rem_tlist()

This commit is contained in:
rlar 2017-03-25 21:56:50 +01:00
parent c600312d01
commit e35429a222
3 changed files with 17 additions and 0 deletions

View File

@ -1589,6 +1589,20 @@ inp_parse_temper_trees(struct circ *circ)
}
void
rem_tlist(struct pt_temper *p)
{
while (p) {
struct pt_temper *next_p = p->next;
tfree(p->expression);
wl_free(p->wl);
INPfreeTree((IFparseTree *) p->pt);
tfree(p);
p = next_p;
}
}
void
inp_evaluate_temper(struct circ *circ)
{

View File

@ -257,6 +257,8 @@ com_remcirc(wordlist *wl)
tfree(ft_curckt->ci_name);
if (ft_curckt->ci_filename)
tfree(ft_curckt->ci_filename);
rem_tlist(ft_curckt->devtlist);
rem_tlist(ft_curckt->modtlist);
/* delete the actual circuit entry from ft_circuits */
for (p = ft_circuits; p; p = p->ci_next) {

View File

@ -219,6 +219,7 @@ extern struct line *line_nconc(struct line *head, struct line *rest);
extern struct line *line_reverse(struct line *head);
extern char **circarray;
extern void rem_tlist(struct pt_temper *p);
/* nutinp.c */