diff options
author | Simon Rettberg | 2019-02-18 11:55:41 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-18 11:55:41 +0100 |
commit | ae69a754244c4e475c8d2591772ca8e005071d83 (patch) | |
tree | 58b3fa7abc2dcfe3c23e1c0ce108950c720826ab /hacks/barcode.c | |
parent | Update gitignore (diff) | |
download | xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.gz xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.xz xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.zip |
Update to 5.42
Diffstat (limited to 'hacks/barcode.c')
-rw-r--r-- | hacks/barcode.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/hacks/barcode.c b/hacks/barcode.c index 31574bd..2ce609e 100644 --- a/hacks/barcode.c +++ b/hacks/barcode.c @@ -391,14 +391,12 @@ static void bitmapClear (Bitmap *b) memset (b->buf, 0, b->widthBytes * b->height); } -#if 0 /* free a bitmap */ static void bitmapFree (Bitmap *b) { free (b->buf); free (b); } -#endif /* get the byte value at the given byte-offset coordinates in the given @@ -1913,6 +1911,16 @@ barcode_reshape (Display *dpy, Window window, void *closure, static void barcode_free (Display *dpy, Window window, void *closure) { + struct state *st = (struct state *) closure; + int i; + XFreeGC (dpy, st->theGC); + st->theImage->data = 0; + XDestroyImage (st->theImage); + bitmapFree (st->theBitmap); + for (i = 0; i < st->barcode_max; i++) + bitmapFree (st->barcodes[i].bitmap); + free (st->barcodes); + free (st); } |