summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-01-25 10:32:39 -0500
committerDana Jansens <danakj@orodu.net>2008-01-25 10:32:39 -0500
commit1c2ec09e43b09554c10dd53fc750e975eaa8719c (patch)
tree7ec73352604b2bbedb33a43b9172007c2ec8c49d
parent01a60706be14d7bd20ec527935ee005e90de9bf2 (diff)
fix a memleak in client_update_icon_geometry
-rw-r--r--openbox/client.c11
1 files changed, 6 insertions, 5 deletions
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);
}
}