From: Dana Jansens Date: Fri, 25 Jan 2008 15:32:39 +0000 (-0500) Subject: fix a memleak in client_update_icon_geometry X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=1c2ec09e43b09554c10dd53fc750e975eaa8719c;p=chaz%2Fopenbox fix a memleak in client_update_icon_geometry --- diff --git a/openbox/client.c b/openbox/client.c index 47e0af6d..6adaa059 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -2176,12 +2176,13 @@ void client_update_icon_geometry(ObClient *self) RECT_SET(self->icon_geometry, 0, 0, 0, 0); - if (PROP_GETA32(self->window, net_wm_icon_geometry, cardinal, &data, &num) - && num == 4) + if (PROP_GETA32(self->window, net_wm_icon_geometry, cardinal, &data, &num)) { - /* don't let them set it with an area < 0 */ - RECT_SET(self->icon_geometry, data[0], data[1], - MAX(data[2],0), MAX(data[3],0)); + if (num == 4) + /* don't let them set it with an area < 0 */ + RECT_SET(self->icon_geometry, data[0], data[1], + MAX(data[2],0), MAX(data[3],0)); + g_free(data); } }