summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2003-07-11 20:36:25 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2003-07-11 20:36:25 +0000
commitd5da9bebd47b04e430879652da7ecab9a0e24474 (patch)
treec66f5e40da5cead88c2631f927a2922561667c9c /gdk-pixbuf
parent7d8cef980b699666bd3b574c9974e1f6c26c77ee (diff)
downloadgdk-pixbuf-d5da9bebd47b04e430879652da7ecab9a0e24474.tar.gz
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().
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/gdk-pixbuf-io.c8
-rw-r--r--gdk-pixbuf/queryloaders.c10
2 files changed, 8 insertions, 10 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index afb376eee..5f831f3e4 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -1036,7 +1036,7 @@ gdk_pixbuf_format_get_name (GdkPixbufFormat *format)
*
* Returns a description of the format.
*
- * Return value: a description of the format.
+ * Return value: a description of the format.
*
* Since: 2.2
*/
@@ -1062,7 +1062,8 @@ gdk_pixbuf_format_get_description (GdkPixbufFormat *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
*/
@@ -1081,7 +1082,8 @@ gdk_pixbuf_format_get_mime_types (GdkPixbufFormat *format)
* Returns the filename extensions typically used for files in the
* 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
*/
diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
index 0698fab24..15c3bdb98 100644
--- a/gdk-pixbuf/queryloaders.c
+++ b/gdk-pixbuf/queryloaders.c
@@ -64,14 +64,10 @@ query_module (const char *dir, const char *file)
char **ext;
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);
- else {
- char *cwd = g_get_current_dir ();
- path = g_build_filename (cwd, dir, file, NULL);
- g_free (cwd);
- }
-
module = g_module_open (path, 0);
if (module &&