diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 205ff56..8229725 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -2057,6 +2057,7 @@ gdk_pixbuf_savev (GdkPixbuf  *pixbuf,
        if (!result) {
                g_return_val_if_fail (error == NULL || *error != NULL, FALSE);
                fclose (f);
+               g_unlink (filename);
                return FALSE;
        }
 
