From: Martin Olsson Date: Sun, 8 Jul 2012 01:03:40 +0000 (+0200) Subject: clients: Don't leak "menu" on error path in clients/window.c X-Git-Tag: 0.95.0~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=444799adbbac6d1e97cfe178c7d40311e4f2f810;p=platform%2Fupstream%2Fweston.git clients: Don't leak "menu" on error path in clients/window.c --- diff --git a/clients/window.c b/clients/window.c index 8f3c942..f81d06f 100644 --- a/clients/window.c +++ b/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);