summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-xbm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk-pixbuf/io-xbm.c')
-rw-r--r--gdk-pixbuf/io-xbm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdk-pixbuf/io-xbm.c b/gdk-pixbuf/io-xbm.c
index c989ada04b..62413a1a96 100644
--- a/gdk-pixbuf/io-xbm.c
+++ b/gdk-pixbuf/io-xbm.c
@@ -365,10 +365,10 @@ gdk_pixbuf__xbm_image_begin_load (ModulePreparedNotifyFunc prepare_func,
context->update_func = update_func;
context->user_data = user_data;
context->all_okay = TRUE;
- context->tempname = g_strdup ("/tmp/gdkpixbuf-xbm-tmp.XXXXXX");
- fd = mkstemp (context->tempname);
+ fd = g_file_open_tmp ("gdkpixbuf-xbm-tmp.XXXXXX",
+ &context->tempname,
+ NULL);
if (fd < 0) {
- g_free (context->tempname);
g_free (context);
return NULL;
}