Commit 5e4287a1 authored by Manish Singh's avatar Manish Singh

app/procedural_db.c applied mem leak patch from Mattias Gronlund

* app/procedural_db.c
* app/text_tool.c: applied mem leak patch from Mattias Gronlund

* plug-ins/tiff/tiff.c: fix for indexed save from Dan Mitchell

-Yosh
parent 630c6119
Sun Apr 26 16:17:46 PDT 1998 Manish Singh <yosh@gimp.org>
* app/procedural_db.c
* app/text_tool.c: applied mem leak patch from Mattias Gronlund
* plug-ins/tiff/tiff.c: fix for indexed save from Dan Mitchell
Sun Apr 26 15:11:06 PDT 1998 Manish Singh <yosh@gimp.org>
* plug-ins/oilify/oilify.c: folded optimizations back in
......
......@@ -1070,6 +1070,14 @@ procedural_db_query (Argument *args)
g_hash_table_foreach (procedural_ht, procedural_db_query_entry, &pdb_query);
free (pdb_query.name_regex.buffer);
free (pdb_query.blurb_regex.buffer);
free (pdb_query.help_regex.buffer);
free (pdb_query.author_regex.buffer);
free (pdb_query.copyright_regex.buffer);
free (pdb_query.date_regex.buffer);
free (pdb_query.proc_type_regex.buffer);
return_args = procedural_db_return_args (&procedural_db_query_proc, TRUE);
return_args[1].value.pdb_int = pdb_query.num_procs;
......
......@@ -1330,6 +1330,7 @@ text_insert_font (FontInfo **table,
if (cmp == 0)
{
table[middle]->fontnames = g_slist_prepend (table[middle]->fontnames, g_strdup (fontname));
g_free (family);
return;
}
else if (cmp < 0)
......@@ -1412,7 +1413,10 @@ text_insert_field (GSList *list,
}
if (cmp == 0)
return list;
{
g_free (field);
return list;
}
new_list = g_slist_alloc();
new_list->data = field;
......
......@@ -1330,6 +1330,7 @@ text_insert_font (FontInfo **table,
if (cmp == 0)
{
table[middle]->fontnames = g_slist_prepend (table[middle]->fontnames, g_strdup (fontname));
g_free (family);
return;
}
else if (cmp < 0)
......@@ -1412,7 +1413,10 @@ text_insert_field (GSList *list,
}
if (cmp == 0)
return list;
{
g_free (field);
return list;
}
new_list = g_slist_alloc();
new_list->data = field;
......
......@@ -1330,6 +1330,7 @@ text_insert_font (FontInfo **table,
if (cmp == 0)
{
table[middle]->fontnames = g_slist_prepend (table[middle]->fontnames, g_strdup (fontname));
g_free (family);
return;
}
else if (cmp < 0)
......@@ -1412,7 +1413,10 @@ text_insert_field (GSList *list,
}
if (cmp == 0)
return list;
{
g_free (field);
return list;
}
new_list = g_slist_alloc();
new_list->data = field;
......
......@@ -764,9 +764,9 @@ save_image (char *filename,
for (i = 0; i < colors; i++)
{
red[i] = *cmap++ << 8;
grn[i] = *cmap++ << 8;
blu[i] = *cmap++ << 8;
red[i] = *cmap++ * 65535 / 255;
grn[i] = *cmap++ * 65535 / 255;
blu[i] = *cmap++ * 65535 / 255;
}
break;
case INDEXEDA_IMAGE:
......
......@@ -764,9 +764,9 @@ save_image (char *filename,
for (i = 0; i < colors; i++)
{
red[i] = *cmap++ << 8;
grn[i] = *cmap++ << 8;
blu[i] = *cmap++ << 8;
red[i] = *cmap++ * 65535 / 255;
grn[i] = *cmap++ * 65535 / 255;
blu[i] = *cmap++ * 65535 / 255;
}
break;
case INDEXEDA_IMAGE:
......
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