+Mon Apr 4 22:27:34 2005 Ben Pfaff <blp@gnu.org>
+
+ * aggregate.c: (parse_aggregate_functions) If dict_create_var()
+ fails, don't dereference the resulting null pointer (PR 12427).
+ Also, fix double free error.
+
Sat Mar 19 23:06:02 2005 Ben Pfaff <blp@gnu.org>
* aggregate.c: (parse_aggregate_functions) Fix N_NO_VARS format.
|| function->alpha_type == NUMERIC)
{
destvar = dict_create_var (agr->dict, dest[i], 0);
-
- if ((func_index == N || func_index == NMISS)
- && dict_get_weight (default_dict) != NULL)
- destvar->print = destvar->write = f8_2;
- else
- destvar->print = destvar->write = function->format;
+ if (destvar != NULL)
+ {
+ if ((func_index == N || func_index == NMISS)
+ && dict_get_weight (default_dict) != NULL)
+ destvar->print = destvar->write = f8_2;
+ else
+ destvar->print = destvar->write = function->format;
+ }
}
- else
- destvar = dict_create_var (agr->dict, dest[i],
- v->src->width);
} else {
v->src = NULL;
destvar = dict_create_var (agr->dict, dest[i], 0);
"the aggregate variables and the break "
"variables."),
dest[i]);
- free (dest[i]);
goto error;
}