]> git.eshelyaron.com Git - emacs.git/commitdiff
* image.c (x_create_bitmap_from_xpm_data): Free attributes on
authorChong Yidong <cyd@stupidchicken.com>
Fri, 18 Nov 2005 03:57:36 +0000 (03:57 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 18 Nov 2005 03:57:36 +0000 (03:57 +0000)
fail.

src/ChangeLog
src/image.c

index 078164c5fb946644e7c7f26018b432feaae4f8fc..1a9fd72016764563f3bd32a3f0e1d27f003b3ff1 100644 (file)
@@ -1,5 +1,8 @@
 2005-11-17  Chong Yidong  <cyd@stupidchicken.com>
 
+       * image.c (x_create_bitmap_from_xpm_data): Free attributes on
+       fail.
+
        * xfaces.c (Qignore_defface): New variable.
        (syms_of_xfaces): Provide `:ignore-defface'.
        (IGNORE_DEFFACE_P): New macro.
index 1ba1cd197ff71cef6c4fbdadfae0e51748b0e1c9..c7bc71ee90962616b72ee360a3f69b4accc7e3d9 100644 (file)
@@ -3737,10 +3737,12 @@ x_create_bitmap_from_xpm_data (f, bits)
   rc = XpmCreatePixmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                                bits, &bitmap, &mask, &attrs);
   if (rc != XpmSuccess)
-    return -1;
+    {
+      XpmFreeAttributes (&attrs);
+      return -1;
+    }
 
   id = x_allocate_bitmap_record (f);
-
   dpyinfo->bitmaps[id - 1].pixmap = bitmap;
   dpyinfo->bitmaps[id - 1].have_mask = 1;
   dpyinfo->bitmaps[id - 1].mask = mask;