diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-06-13 01:58:34 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-06-13 01:58:34 +0000 |
| commit | 9586e3bf1482a30e29f230a1a987386fcdcec2c9 (patch) | |
| tree | f102c76852ed547472b2756d058e3d03620c3b71 /openbox/menuframe.c | |
| parent | 7a6a516b8e3d8ad6b15379eabf6652a6f43eab27 (diff) | |
plug memory leaks from the new strut code
Diffstat (limited to 'openbox/menuframe.c')
| -rw-r--r-- | openbox/menuframe.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 6b3e729b..4f5a34d8 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -343,6 +343,8 @@ void menu_frame_move_on_screen(ObMenuFrame *self, gint x, gint y, *dx = MAX(*dx, a->x - x); *dy = MAX(*dy, a->y - y); } + + g_free(a); } static void menu_entry_frame_render(ObMenuEntryFrame *self) @@ -888,6 +890,8 @@ static void menu_frame_update(ObMenuFrame *self) } } + g_free(a); + menu_frame_render(self); } @@ -948,8 +952,10 @@ gboolean menu_frame_show_topmenu(ObMenuFrame *self, gint x, gint y, /* find the monitor the menu is on */ for (i = 0; i < screen_num_monitors; ++i) { - Rect *a = screen_physical_area_monitor(i); - if (RECT_CONTAINS(*a, x, y)) { + Rect a = screen_physical_area_monitor(i); + gboolean contains = RECT_CONTAINS(*a, x, y); + g_free(a); + if (contains) { self->monitor = i; break; } |
