]> Dogcows Code - chaz/openbox/commitdiff
fix a memleak in client_update_icon_geometry
authorDana Jansens <danakj@orodu.net>
Fri, 25 Jan 2008 15:32:39 +0000 (10:32 -0500)
committerDana Jansens <danakj@orodu.net>
Fri, 25 Jan 2008 15:32:39 +0000 (10:32 -0500)
openbox/client.c

index 47e0af6dac1658d3dfe0e4978fa7fe0da27a2fe5..6adaa0594dc15b8937f2f3759c17aa4b3938f010 100644 (file)
@@ -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);
     }
 }
 
This page took 0.026651 seconds and 4 git commands to generate.