From 7b2627cbf9ba91c0d88d1d6168f253904137a618 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 13 Apr 2009 14:13:34 +0200 Subject: [PATCH] Fix a small memleak in window_opacity_get() Signed-off-by: Uli Schlachter --- window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/window.c b/window.c index 14d0ab59..27387f52 100644 --- a/window.c +++ b/window.c @@ -143,7 +143,9 @@ window_opacity_get(xcb_window_t win) if(prop_r->value_len) { unsigned int *data = xcb_get_property_value(prop_r); - return (double) *data / (double) 0xffffffff; + unsigned int value = *data; + p_delete(&prop_r); + return (double) value / (double) 0xffffffff; } bailout: