File gdk-pixbuf-226710.patch of Package gtk2

--- gtk+-2.10.6/gdk-pixbuf/gdk-pixbuf-loader.c.close-loader	2006-07-16 22:37:29.000000000 -0400
+++ gtk+-2.10.6/gdk-pixbuf/gdk-pixbuf-loader.c	2006-12-09 23:11:10.000000000 -0500
@@ -455,10 +472,7 @@
       
                         eaten = gdk_pixbuf_loader_eat_header_write (loader, buf, count, error);
                         if (eaten <= 0)
-                                {
-                                        gdk_pixbuf_loader_ensure_error (loader, error);
-                                        return FALSE;
-                                }
+                               goto fail; 
       
                         count -= eaten;
                         buf += eaten;
@@ -466,16 +480,25 @@
   
         if (count > 0 && priv->image_module->load_increment)
                 {
-                        gboolean retval;
-                        retval = priv->image_module->load_increment (priv->context, buf, count,
-                                                                     error);
-                        if (!retval)
-                                gdk_pixbuf_loader_ensure_error (loader, error);
-
-                        return retval;
+                        if (!priv->image_module->load_increment (priv->context, buf, count,
+                                                                 error))
+				goto fail;
                 }
       
         return TRUE;
+
+ fail:
+        gdk_pixbuf_loader_ensure_error (loader, error);
+
+        priv->closed = TRUE;
+
+        if (priv->image_module && priv->holds_threadlock) 
+		{
+                	_gdk_pixbuf_unlock (priv->image_module);
+                	priv->holds_threadlock = FALSE;
+        	}
+
+        return FALSE;
 }
 
 /**

openSUSE Build Service is sponsored by