free spice_init_devices() allocated memory in com_quit()

This commit is contained in:
rlar 2012-09-21 21:16:23 +02:00
parent 811bf5664a
commit 71240d19be
4 changed files with 19 additions and 0 deletions

View File

@ -29,6 +29,7 @@ extern char history_file[];
#endif
extern IFsimulator SIMinfo;
extern void spice_destroy_devices(void); /* FIXME need a better place */
static void byemesg(void);
static int confirm_quit(void);
@ -80,6 +81,7 @@ com_quit(wordlist *wl)
byemesg();
destroy_const_plot();
spice_destroy_devices();
exit(exitcode);
}

View File

@ -374,6 +374,10 @@ void SMPprintRHS( SMPmatrix *n1, char *n2 , double* n3 , double* n4)
return;
}
void spice_destroy_devices(void)
{
}
#endif /* SIMULATOR */
#ifndef SIMULATOR

View File

@ -233,6 +233,18 @@ int load_vadev(CKTcircuit *ckt, char *name)
}
#endif
void
spice_destroy_devices(void)
{
#ifdef XSPICE
tfree(g_evt_udn_info);
tfree(DEVicesfl);
#endif
tfree(DEVices);
}
void
spice_init_devices(void)
{

View File

@ -3,6 +3,7 @@
void spice_init_devices(void);
void spice_destroy_devices(void);
int num_devices(void);
IFdevice **devices_ptr(void);
SPICEdev **devices(void);