const struct variable **design_vars;
size_t n_interactions;
- const struct interaction **interactions;
+ struct interaction **interactions;
enum mv_class exclude;
int
cmd_glm (struct lexer *lexer, struct dataset *ds)
{
+ int i;
struct const_var_set *factors = NULL;
struct glm_spec glm;
bool design = false;
const_var_set_destroy (factors);
free (glm.factor_vars);
+ for (i = 0 ; i < glm.n_interactions; ++i)
+ interaction_destroy (glm.interactions[i]);
free (glm.interactions);
free (glm.dep_vars);
+ free (glm.design_vars);
return CMD_SUCCESS;
const_var_set_destroy (factors);
free (glm.factor_vars);
+ for (i = 0 ; i < glm.n_interactions; ++i)
+ interaction_destroy (glm.interactions[i]);
+
free (glm.interactions);
free (glm.dep_vars);
+ free (glm.design_vars);
return CMD_FAILURE;
}
if (cat != NULL)
{
for (i = 0 ; i < cat->n_vp; ++i)
- hmap_destroy (&cat->vp[i].map);
+ {
+ struct hmap *map = &cat->vp[i].map;
+ struct value_node *nn;
+
+ HMAP_FOR_EACH (nn, struct value_node, node, map)
+ {
+ case_unref (nn->ccase);
+ }
+
+ hmap_destroy (map);
+ }
pool_destroy (cat->pool);
free (cat);