Commit 18998710 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(free_fontset_data): Don't free null pointer.

parent 8ffbfaa9
......@@ -97,19 +97,22 @@ void
free_fontset_data (fontset_data)
struct fontset_data *fontset_data;
{
int i;
for (i = 0; i < fontset_data->n_fontsets; i++)
if (fontset_data->fontset_table)
{
int j;
int i;
xfree (fontset_data->fontset_table[i]->name);
for (j = 0; j <= MAX_CHARSET; j++)
if (fontset_data->fontset_table[i]->fontname[j])
xfree (fontset_data->fontset_table[i]->fontname[j]);
xfree (fontset_data->fontset_table[i]);
for (i = 0; i < fontset_data->n_fontsets; i++)
{
int j;
xfree (fontset_data->fontset_table[i]->name);
for (j = 0; j <= MAX_CHARSET; j++)
if (fontset_data->fontset_table[i]->fontname[j])
xfree (fontset_data->fontset_table[i]->fontname[j]);
xfree (fontset_data->fontset_table[i]);
}
xfree (fontset_data->fontset_table);
}
xfree (fontset_data->fontset_table);
xfree (fontset_data);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment