summaryrefslogtreecommitdiff
path: root/Bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'Bitmap.c')
-rw-r--r--Bitmap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Bitmap.c b/Bitmap.c
index 8171bef..704cb98 100644
--- a/Bitmap.c
+++ b/Bitmap.c
@@ -389,8 +389,10 @@ BWGetUnzoomedPixmap(Widget w)
BW->bitmap.zoom.image->width,
BW->bitmap.zoom.image->height, 1);
if (!(gc = XCreateGC(XtDisplay(w), pix,
- (unsigned long) 0, (XGCValues *) 0)))
+ (unsigned long) 0, (XGCValues *) 0))) {
+ XFreePixmap(XtDisplay(w), pix);
return (Pixmap) None;
+ }
XPutImage(XtDisplay(w), pix, gc,
BW->bitmap.zoom.image,
@@ -410,8 +412,10 @@ BWGetUnzoomedPixmap(Widget w)
BW->bitmap.image->width,
BW->bitmap.image->height, 1);
if (! (gc = XCreateGC(XtDisplay(w), pix,
- (unsigned long) 0, (XGCValues *) 0)))
+ (unsigned long) 0, (XGCValues *) 0))){
+ XFreePixmap(XtDisplay(w), pix);
return (Pixmap) None;
+ }
XPutImage(XtDisplay(w), pix, gc,
BW->bitmap.image,