plug a small memory leak in switch-oscillators.cir
This commit is contained in:
parent
2b50ca7271
commit
0fbe920382
|
|
@ -393,7 +393,7 @@ if_option(CKTcircuit *ckt, char *name, enum cp_types type, void *value)
|
||||||
{
|
{
|
||||||
IFvalue pval;
|
IFvalue pval;
|
||||||
int err;
|
int err;
|
||||||
char **vv;
|
char **vv, *sfree = NULL;
|
||||||
int which = -1;
|
int which = -1;
|
||||||
IFparm *if_parm;
|
IFparm *if_parm;
|
||||||
|
|
||||||
|
|
@ -466,7 +466,7 @@ if_option(CKTcircuit *ckt, char *name, enum cp_types type, void *value)
|
||||||
break;
|
break;
|
||||||
case IF_STRING:
|
case IF_STRING:
|
||||||
if (type == CP_STRING)
|
if (type == CP_STRING)
|
||||||
pval.sValue = copy((char*) value);
|
sfree = pval.sValue = copy((char*) value);
|
||||||
else
|
else
|
||||||
goto badtype;
|
goto badtype;
|
||||||
break;
|
break;
|
||||||
|
|
@ -502,6 +502,7 @@ if_option(CKTcircuit *ckt, char *name, enum cp_types type, void *value)
|
||||||
if_parm->id, &pval,
|
if_parm->id, &pval,
|
||||||
NULL)) != OK)
|
NULL)) != OK)
|
||||||
ft_sperror(err, "setAnalysisParm(options) ci_curOpt");
|
ft_sperror(err, "setAnalysisParm(options) ci_curOpt");
|
||||||
|
tfree(sfree);
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue