Commit 55be97a0 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

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.
parent 5978e395
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> 2005-04-27 Sven Neumann <sven@gimp.org>
* app/widgets/gimpunitstore.c: don't call va_arg() too often. * app/widgets/gimpunitstore.c: don't call va_arg() too often.
......
...@@ -129,7 +129,7 @@ gimp_clipboard_init (Gimp *gimp) ...@@ -129,7 +129,7 @@ gimp_clipboard_init (Gimp *gimp)
for (type = mime_types; *type; type++) for (type = mime_types; *type; type++)
{ {
gchar *mime_type = *type; const gchar *mime_type = *type;
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("GimpClipboard: writable pixbuf format: %s\n", g_print ("GimpClipboard: writable pixbuf format: %s\n",
...@@ -262,7 +262,13 @@ gimp_clipboard_get (Gimp *gimp) ...@@ -262,7 +262,13 @@ gimp_clipboard_get (Gimp *gimp)
static void static void
gimp_clipboard_free (GimpClipboard *gimp_clip) gimp_clipboard_free (GimpClipboard *gimp_clip)
{ {
gint i;
g_slist_free (gimp_clip->pixbuf_formats); 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->target_entries);
g_free (gimp_clip); g_free (gimp_clip);
} }
......
...@@ -370,12 +370,14 @@ gimp_path_editor_set_path (GimpPathEditor *editor, ...@@ -370,12 +370,14 @@ gimp_path_editor_set_path (GimpPathEditor *editor,
old_path = gimp_path_editor_get_path (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); g_free (old_path);
return; return;
} }
g_free (old_path);
path_list = gimp_path_parse (path, 16, TRUE, NULL); path_list = gimp_path_parse (path, 16, TRUE, NULL);
gtk_list_store_clear (editor->dir_list); gtk_list_store_clear (editor->dir_list);
......
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