diff --git a/src/frontend/options.c b/src/frontend/options.c index 6cceb2fa6..f01757902 100644 --- a/src/frontend/options.c +++ b/src/frontend/options.c @@ -67,6 +67,7 @@ cp_enqvar(char *word) vv->va_vlist = NULL; for (i = d->v_length - 1; i >= 0; i--) { tv = TMALLOC(struct variable, 1); + tv->va_name = NULL; tv->va_type = CP_REAL; if (isreal(d)) tv->va_real = d->v_realdata[i]; @@ -120,6 +121,7 @@ cp_enqvar(char *word) vv->va_vlist = NULL; for (pl = plot_list; pl; pl = pl->pl_next) { tv = TMALLOC(struct variable, 1); + tv->va_name = NULL; tv->va_type = CP_STRING; tv->va_string = copy(pl->pl_typename); tv->va_next = vv->va_vlist; diff --git a/src/frontend/spiceif.c b/src/frontend/spiceif.c index 954c9371d..3b39be5a3 100644 --- a/src/frontend/spiceif.c +++ b/src/frontend/spiceif.c @@ -982,8 +982,10 @@ parmtovar(IFvalue *pv, IFparm *opt) break; case IF_REALVEC: vv->va_type = CP_LIST; + vv->va_vlist = NULL; for (i = 0; i < pv->v.numValue; i++) { nv = TMALLOC(struct variable, 1); + nv->va_name = NULL; nv->va_next = vv->va_vlist; vv->va_vlist = nv; nv->va_type = CP_REAL; diff --git a/src/frontend/variable.c b/src/frontend/variable.c index e3bbbc04b..8245b1e44 100644 --- a/src/frontend/variable.c +++ b/src/frontend/variable.c @@ -347,6 +347,7 @@ cp_setparse(wordlist *wl) break; } vv = TMALLOC(struct variable, 1); + vv->va_name = NULL; vv->va_next = NULL; copyval = ss = cp_unquote(wl->wl_word); td = ft_numparse(&ss, FALSE); @@ -462,8 +463,8 @@ cp_remvar(char *varname) if (!v) { /* Gotta make up a var struct for cp_usrset()... */ v = TMALLOC(struct variable, 1); - ZERO(v, struct variable); v->va_name = copy(varname); + v->va_next = NULL; v->va_type = CP_NUM; v->va_num = 0; found = FALSE;