Fix some memleaks.
[dana/openbox.git] / openbox / popup.c
index 283348e..15d1bf5 100644 (file)
@@ -257,6 +257,8 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
     x=MAX(MIN(x, area->x+area->width-w),area->x);
     y=MAX(MIN(y, area->y+area->height-h),area->y);
 
+    g_free(area);
+
     if (m == screen_num_monitors) {
         RECT_SET(mon, x, y, w, h);
         m = screen_find_monitor(&mon);
@@ -266,6 +268,8 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
 
         x=MAX(MIN(x, area->x+area->width-w),area->x);
         y=MAX(MIN(y, area->y+area->height-h),area->y);
+
+        g_free(area);
     }
 
     /* set the windows/appearances up */
@@ -301,8 +305,6 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
             popup_show_timeout(self);
         }
     }
-
-    g_free(area);
 }
 
 void popup_hide(ObPopup *self)