clients: Don't leak "menu" on error path in clients/window.c

Martin Olsson 13 years ago committed by Kristian Høgsberg
parent ff52193ee8
commit 444799adbb
  1. 4
      clients/window.c

@ -3133,8 +3133,10 @@ window_show_menu(struct display *display,
return;
window = window_create_internal(parent->display, parent, TYPE_MENU);
if (!window)
if (!window) {
free(menu);
return;
}
menu->window = window;
menu->widget = window_add_widget(menu->window, menu);

Loading…
Cancel
Save