diff options
author | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-25 04:21:40 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-25 04:21:40 -0700 |
commit | fd3dc25ae8512d3acdd29d3ea5c8643724c29e7b (patch) | |
tree | 109095a3a0544d29287442c3e038c29c12871b3c | |
parent | b5e095e57232731b0c4bc93b33c7d78406ec3b1d (diff) |
composite: fix root_buffer leak on invalidate root
This doesn't happen frequently and has gone utterly unnoticed as harmless,
but it's something I noticed in reviewing the code for more lingering style
issues.
-rw-r--r-- | src/composite.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/composite.c b/src/composite.c index 7f06cec..76a6d81 100644 --- a/src/composite.c +++ b/src/composite.c @@ -164,10 +164,15 @@ void vwm_composite_invalidate_root(vwm_t *vwm) if (!compositing_mode) return; - if (root_picture) XRenderFreePicture(VWM_XDISPLAY(vwm), root_picture); - root_picture = None; - if (root_buffer) XRenderFreePicture(VWM_XDISPLAY(vwm), root_picture); - root_buffer = None; + if (root_picture) { + XRenderFreePicture(VWM_XDISPLAY(vwm), root_picture); + root_picture = None; + } + + if (root_buffer) { + XRenderFreePicture(VWM_XDISPLAY(vwm), root_buffer); + root_buffer = None; + } } void vwm_composite_repaint_needed(vwm_t *vwm) |