free all memory allocated for GimpClipboard.

2005-04-27  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpclipboard.c (gimp_clipboard_free): free all
	memory allocated for GimpClipboard.

	* libgimpwidgets/gimppatheditor.c (gimp_path_editor_set_path):
	always free old_path.
This commit is contained in:
Sven Neumann 2005-04-27 15:59:14 +00:00 committed by Sven Neumann
parent 5978e395a3
commit 55be97a021
3 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2005-04-27 Sven Neumann <sven@gimp.org>
* app/widgets/gimpclipboard.c (gimp_clipboard_free): free all
memory allocated for GimpClipboard.
* libgimpwidgets/gimppatheditor.c (gimp_path_editor_set_path):
always free old_path.
2005-04-27 Sven Neumann <sven@gimp.org>
* app/widgets/gimpunitstore.c: don't call va_arg() too often.

View File

@ -129,7 +129,7 @@ gimp_clipboard_init (Gimp *gimp)
for (type = mime_types; *type; type++)
{
gchar *mime_type = *type;
const gchar *mime_type = *type;
if (gimp->be_verbose)
g_print ("GimpClipboard: writable pixbuf format: %s\n",
@ -262,7 +262,13 @@ gimp_clipboard_get (Gimp *gimp)
static void
gimp_clipboard_free (GimpClipboard *gimp_clip)
{
gint i;
g_slist_free (gimp_clip->pixbuf_formats);
for (i = 0; i < gimp_clip->n_target_entries; i++)
g_free (gimp_clip->target_entries[i].target);
g_free (gimp_clip->target_entries);
g_free (gimp_clip);
}

View File

@ -370,12 +370,14 @@ gimp_path_editor_set_path (GimpPathEditor *editor,
old_path = gimp_path_editor_get_path (editor);
if (old_path == path || (old_path && path && ! strcmp (old_path, path)))
if (old_path && path && strcmp (old_path, path) == 0)
{
g_free (old_path);
return;
}
g_free (old_path);
path_list = gimp_path_parse (path, 16, TRUE, NULL);
gtk_list_store_clear (editor->dir_list);