com_option.c, com_option(), remove a memory leak

This commit is contained in:
h_vogt 2016-07-17 13:47:23 +02:00 committed by rlar
parent 3c2c6e8cde
commit fa9eb77c0a
1 changed files with 3 additions and 3 deletions

View File

@ -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);
} }