com_option.c, com_option(), remove a memory leak
This commit is contained in:
parent
3c2c6e8cde
commit
fa9eb77c0a
|
|
@ -14,7 +14,7 @@
|
||||||
void
|
void
|
||||||
com_option(wordlist *wl)
|
com_option(wordlist *wl)
|
||||||
{
|
{
|
||||||
struct variable *vars;
|
struct variable *vars, *varsfree;
|
||||||
|
|
||||||
CKTcircuit *circuit = NULL;
|
CKTcircuit *circuit = NULL;
|
||||||
|
|
||||||
|
|
@ -87,7 +87,7 @@ com_option(wordlist *wl)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
vars = cp_setparse(wl);
|
varsfree = vars = cp_setparse(wl);
|
||||||
|
|
||||||
/* This is sort of a hassle... */
|
/* This is sort of a hassle... */
|
||||||
while (vars) {
|
while (vars) {
|
||||||
|
|
@ -116,6 +116,6 @@ com_option(wordlist *wl)
|
||||||
cp_vset(vars->va_name, vars->va_type, s);
|
cp_vset(vars->va_name, vars->va_type, s);
|
||||||
vars = vars->va_next;
|
vars = vars->va_next;
|
||||||
}
|
}
|
||||||
free_struct_variable(vars);
|
free_struct_variable(varsfree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue