summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-xpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk-pixbuf/io-xpm.c')
-rw-r--r--gdk-pixbuf/io-xpm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdk-pixbuf/io-xpm.c b/gdk-pixbuf/io-xpm.c
index b762c87054..df561498f8 100644
--- a/gdk-pixbuf/io-xpm.c
+++ b/gdk-pixbuf/io-xpm.c
@@ -1413,10 +1413,9 @@ gdk_pixbuf__xpm_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-xpm-tmp.XXXXXX");
- fd = mkstemp (context->tempname);
+ fd = g_file_open_tmp ("gdkpixbuf-xpm-tmp.XXXXXX", &context->tempname,
+ NULL);
if (fd < 0) {
- g_free (context->tempname);
g_free (context);
return NULL;
}