spicelib/parser/inpptree.c, bug fix, "#287 Shared library crashes on using non existing functions "

"remcirc" has the potential to invoke INPfreeTree() with a NULL IFparseTree

Thanks to Craggan, who reported this in:
  http://sourceforge.net/p/ngspice/bugs/287/
This commit is contained in:
rlar 2015-05-04 20:17:28 +02:00
parent 6ff1560487
commit f4472f788e
1 changed files with 3 additions and 0 deletions

View File

@ -1409,6 +1409,9 @@ void INPfreeTree(IFparseTree *ptree)
int i;
if (!pt)
return;
for (i = 0; i < pt->p.numVars; i++)
dec_usage(pt->derivs[i]);