inp.c, function to delete mc_deck called from com_quit avoid memory leak in ngspice.so after dlclose

This commit is contained in:
h_vogt 2016-07-13 23:59:43 +02:00 committed by rlar
parent 913e613fc1
commit b482f45289
2 changed files with 9 additions and 0 deletions

View File

@ -296,6 +296,14 @@ line_free_x(struct line *deck, bool recurse)
}
/* free mc_deck */
void
mc_free(void)
{
line_free_x(mc_deck, TRUE);
}
/* The routine to source a spice input deck. We read the deck in, take
* out the front-end commands, and create a CKT structure. Also we
* filter out the following cards: .save, .width, .four, .print, and

View File

@ -214,6 +214,7 @@ extern void inp_list(FILE *file, struct line *deck, struct line *extras, int typ
extern struct line *inp_readall(FILE *fp, char *dir_name, bool comfile, bool intfile);
extern FILE *inp_pathopen(char *name, char *mode);
extern char *search_identifier(char *str, const char *identifier, char *str_begin);
extern void mc_free(void);
extern char** circarray;