diff options
author | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
commit | aa7530630e595b80d5db54655fd827b61edc0fd7 (patch) | |
tree | 048cb74072450c7592f254c3537ac8f252d09d73 /hacks/barcode.c | |
parent | Forgot one DPMS killing instance (diff) | |
parent | Update to 5.42 (diff) | |
download | xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.gz xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.xz xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.zip |
Merge branch 'master' into openslxv23
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); } |