Commit aa013939 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Use g_strfreev() to free mime_types. (#117219, Steve Chaplin)

2003-07-11  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkicontheme.c (pixbuf_supports_svg): Use g_strfreev() to free mime_types.
	(#117219, Steve Chaplin)

	* queryloaders.c (query_module): Handle absolute filenames properly. (#117170, Jens Elkner)

	* gdk-pixbuf-io.c: Mention that NULL-terminated arrays returned by
	gdk_pixbuf_format_get_mime_types() and gdk_pixbuf_format_get_extensions() must be
	freed with g_strfreev().
parent 50da0ae8
2003-07-11 Matthias Clasen <maclas@gmx.de>
* gtk/gtkicontheme.c (pixbuf_supports_svg): Use g_strfreev() to free mime_types.
(#117219, Steve Chaplin)
Tue Jul 8 20:11:04 2003 Owen Taylor <otaylor@redhat.com> Tue Jul 8 20:11:04 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (get_real_window) * gdk/x11/gdkevents-x11.c (get_real_window)
......
2003-07-11 Matthias Clasen <maclas@gmx.de>
* gtk/gtkicontheme.c (pixbuf_supports_svg): Use g_strfreev() to free mime_types.
(#117219, Steve Chaplin)
Tue Jul 8 20:11:04 2003 Owen Taylor <otaylor@redhat.com> Tue Jul 8 20:11:04 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (get_real_window) * gdk/x11/gdkevents-x11.c (get_real_window)
......
2003-07-11 Matthias Clasen <maclas@gmx.de>
* gtk/gtkicontheme.c (pixbuf_supports_svg): Use g_strfreev() to free mime_types.
(#117219, Steve Chaplin)
Tue Jul 8 20:11:04 2003 Owen Taylor <otaylor@redhat.com> Tue Jul 8 20:11:04 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (get_real_window) * gdk/x11/gdkevents-x11.c (get_real_window)
......
2003-07-11 Matthias Clasen <maclas@gmx.de>
* gtk/gtkicontheme.c (pixbuf_supports_svg): Use g_strfreev() to free mime_types.
(#117219, Steve Chaplin)
Tue Jul 8 20:11:04 2003 Owen Taylor <otaylor@redhat.com> Tue Jul 8 20:11:04 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (get_real_window) * gdk/x11/gdkevents-x11.c (get_real_window)
......
2003-07-11 Matthias Clasen <maclas@gmx.de>
* gtk/gtkicontheme.c (pixbuf_supports_svg): Use g_strfreev() to free mime_types.
(#117219, Steve Chaplin)
Tue Jul 8 20:11:04 2003 Owen Taylor <otaylor@redhat.com> Tue Jul 8 20:11:04 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (get_real_window) * gdk/x11/gdkevents-x11.c (get_real_window)
......
2003-07-11 Matthias Clasen <maclas@gmx.de>
* queryloaders.c (query_module): Handle absolute filenames properly. (#117170, Jens Elkner)
* gdk-pixbuf-io.c: Mention that NULL-terminated arrays returned by
gdk_pixbuf_format_get_mime_types() and gdk_pixbuf_format_get_extensions() must be
freed with g_strfreev().
2003-07-04 Matthias Clasen <maclas@gmx.de> 2003-07-04 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf-io.c: Document ICO save parameters. * gdk-pixbuf-io.c: Document ICO save parameters.
......
...@@ -1036,7 +1036,7 @@ gdk_pixbuf_format_get_name (GdkPixbufFormat *format) ...@@ -1036,7 +1036,7 @@ gdk_pixbuf_format_get_name (GdkPixbufFormat *format)
* *
* Returns a description of the format. * Returns a description of the format.
* *
* Return value: a description of the format. * Return value: a description of the format.
* *
* Since: 2.2 * Since: 2.2
*/ */
...@@ -1062,7 +1062,8 @@ gdk_pixbuf_format_get_description (GdkPixbufFormat *format) ...@@ -1062,7 +1062,8 @@ gdk_pixbuf_format_get_description (GdkPixbufFormat *format)
* *
* Returns the mime types supported by the format. * Returns the mime types supported by the format.
* *
* Return value: a %NULL-terminated array of mime types. * Return value: a %NULL-terminated array of mime types which must be freed with
* g_strfreev() when it is no longer needed.
* *
* Since: 2.2 * Since: 2.2
*/ */
...@@ -1081,7 +1082,8 @@ gdk_pixbuf_format_get_mime_types (GdkPixbufFormat *format) ...@@ -1081,7 +1082,8 @@ gdk_pixbuf_format_get_mime_types (GdkPixbufFormat *format)
* Returns the filename extensions typically used for files in the * Returns the filename extensions typically used for files in the
* given format. * given format.
* *
* Return value: a %NULL-terminated array of filename extensions. * Return value: a %NULL-terminated array of filename extensions which must be
* freed with g_strfreev() when it is no longer needed.
* *
* Since: 2.2 * Since: 2.2
*/ */
......
...@@ -64,14 +64,10 @@ query_module (const char *dir, const char *file) ...@@ -64,14 +64,10 @@ query_module (const char *dir, const char *file)
char **ext; char **ext;
const GdkPixbufModulePattern *pattern; const GdkPixbufModulePattern *pattern;
if (g_path_is_absolute (dir)) if (g_path_is_absolute (file))
path = g_strdup (file);
else
path = g_build_filename (dir, file, NULL); path = g_build_filename (dir, file, NULL);
else {
char *cwd = g_get_current_dir ();
path = g_build_filename (cwd, dir, file, NULL);
g_free (cwd);
}
module = g_module_open (path, 0); module = g_module_open (path, 0);
if (module && if (module &&
......
...@@ -489,7 +489,7 @@ pixbuf_supports_svg () ...@@ -489,7 +489,7 @@ pixbuf_supports_svg ()
found_svg = TRUE; found_svg = TRUE;
} }
g_free (mime_types); g_strfreev (mime_types);
} }
g_slist_free (formats); g_slist_free (formats);
......
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