X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fgroup.c;h=87ba02bbff22fdbdf09119d73a1c8a54d83371c8;hb=338fb2a2e84df6427a2fdee6769421f57d5666d8;hp=c3dcbaadda5f8c8eccfd307294e782d1f2a9f65c;hpb=946282d65fa0142e38d10f78d2c699dacf95300e;p=pspp diff --git a/src/math/group.c b/src/math/group.c index c3dcbaadda..87ba02bbff 100644 --- a/src/math/group.c +++ b/src/math/group.c @@ -63,7 +63,11 @@ struct group_proc * group_proc_get (struct variable *v) { /* This is not ideal, obviously. */ - if (v->aux == NULL) - var_attach_aux (v, xmalloc (sizeof (struct group_proc)), var_dtor_free); - return v->aux; + struct group_proc *group = var_get_aux (v); + if (group == NULL) + { + group = xmalloc (sizeof (struct group_proc)); + var_attach_aux (v, group, var_dtor_free); + } + return group; }