gimp_uninstall_temp_proc(): free the original hash key _after_ removing

2000-10-17  Michael Natterer  <mitch@gimp.org>

	* libgimp/gimp.c: gimp_uninstall_temp_proc(): free the original
	hash key _after_ removing the procedure from the hash table.

	I didn't observe any crash from this bug, but as the function
	is called *only* from

	- plug-ins/perl/Gimp/Lib.c and
	- plug-ins/script-fu/script-fu-scripts.c

	it may have been the reason for various reported perl<->script-fu
	problems. Bug reporters, please check your bugs.
This commit is contained in:
Michael Natterer 2000-10-17 21:38:42 +00:00 committed by Michael Natterer
parent a10008ac0a
commit d69c1a72b4
2 changed files with 17 additions and 3 deletions

View File

@ -1,4 +1,18 @@
2000-10-17 Sven Neumann <sven@gimp.org>
2000-10-17 Michael Natterer <mitch@gimp.org>
* libgimp/gimp.c: gimp_uninstall_temp_proc(): free the original
hash key _after_ removing the procedure from the hash table.
I didn't observe any crash from this bug, but as the function
is called *only* from
- plug-ins/perl/Gimp/Lib.c and
- plug-ins/script-fu/script-fu-scripts.c
it may have been the reason for various reported perl<->script-fu
problems. Bug reporters, please check your bugs.
x2000-10-17 Sven Neumann <sven@gimp.org>
* app/paint_funcs.c
* app/pixel_processor.c

View File

@ -276,7 +276,7 @@ gimp_main (int argc,
return 0;
}
temp_proc_ht = g_hash_table_new (&g_str_hash, &g_str_equal);
temp_proc_ht = g_hash_table_new (g_str_hash, g_str_equal);
g_io_add_watch (_readchannel,
G_IO_ERR | G_IO_HUP,
@ -406,8 +406,8 @@ gimp_uninstall_temp_proc (gchar *name)
found = g_hash_table_lookup_extended (temp_proc_ht, name, &hash_name, NULL);
if (found)
{
g_free (hash_name);
g_hash_table_remove (temp_proc_ht, (gpointer) name);
g_free (hash_name);
}
}