From ae69a754244c4e475c8d2591772ca8e005071d83 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 18 Feb 2019 11:55:41 +0100 Subject: Update to 5.42 --- hacks/bumps.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hacks/bumps.c') 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); } -- cgit v1.2.3-55-g7522