Mercurial > emacs
diff src/image.c @ 66984:9d0a2cc054be
* image.c (x_create_bitmap_from_xpm_data): Free attributes on
fail.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Fri, 18 Nov 2005 03:57:36 +0000 |
parents | 53960d1c1f2f |
children | f7e79cfcfc4f |
line wrap: on
line diff
--- a/src/image.c Fri Nov 18 03:55:45 2005 +0000 +++ b/src/image.c Fri Nov 18 03:57:36 2005 +0000 @@ -3737,10 +3737,12 @@ 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;