From: Chong Yidong Date: Fri, 18 Nov 2005 03:57:36 +0000 (+0000) Subject: * image.c (x_create_bitmap_from_xpm_data): Free attributes on X-Git-Tag: emacs-pretest-22.0.90~5795 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe45ad152a8528e795c3d852bf3c2cd18ffe6e02;p=emacs.git * image.c (x_create_bitmap_from_xpm_data): Free attributes on fail. --- diff --git a/src/ChangeLog b/src/ChangeLog index 078164c5fb9..1a9fd720167 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2005-11-17 Chong Yidong + * 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. diff --git a/src/image.c b/src/image.c index 1ba1cd197ff..c7bc71ee909 100644 --- a/src/image.c +++ b/src/image.c @@ -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;