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/bumps.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/bumps.c')
-rw-r--r-- | hacks/bumps.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hacks/bumps.c b/hacks/bumps.c index fa728e6..d24ce00 100644 --- a/hacks/bumps.c +++ b/hacks/bumps.c @@ -376,6 +376,8 @@ static void SetPalette(Display *dpy, SBumps *pBumps, XWindowAttributes *pXWinAtt #endif /* VERBOSE */ XSetWindowBackground( pBumps->dpy, pBumps->Win, pBumps->aColors[ 0 ] ); + + if (sColor) free (sColor); } @@ -418,6 +420,7 @@ static void InitBumpMap_2(Display *dpy, SBumps *pBumps) XClearWindow (pBumps->dpy, pBumps->Win); XSync (pBumps->dpy, 0); + if (pBumps->aBumpMap) free (pBumps->aBumpMap); pBumps->aBumpMap = malloc( pBumps->iWinWidth * pBumps->iWinHeight * sizeof(uint16_t) ); nSoften = get_integer_resource(dpy, "soften", "Integer" ); @@ -606,9 +609,12 @@ static void DestroySpotLight( SSpotLight *pSpotLight ) { free( pSpotLight->aLigh static void DestroyBumps( SBumps *pBumps ) { DestroySpotLight( &pBumps->SpotLight ); + free (pBumps->xColors); free( pBumps->aColors ); free( pBumps->aBumpMap ); destroy_xshm_image( pBumps->dpy, pBumps->pXImage, &pBumps->XShmInfo ); + XFreeGC (pBumps->dpy, pBumps->GraphicsContext); + free(pBumps); } |