projects
/
profile
/
ivi
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efb9488
)
window: Fix use-after-free in menu button handler
author
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 30 Oct 2012 22:10:30 +0000
(18:10 -0400)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 30 Oct 2012 22:10:32 +0000
(18:10 -0400)
Commit
d2fbb3870cfaea623a87ba28c9587676bbdc93f7
introduced a use-after-free
error in the case where we destroy the menu.
clients/window.c
patch
|
blob
|
history
diff --git
a/clients/window.c
b/clients/window.c
index
d5a14dd
..
fe968ed
100644
(file)
--- a/
clients/window.c
+++ b/
clients/window.c
@@
-3363,10
+3363,9
@@
menu_button_handler(struct widget *widget,
menu->current, menu->window->parent->user_data);
input_ungrab(input);
menu_destroy(menu);
- }
-
- if (state == WL_POINTER_BUTTON_STATE_RELEASED)
+ } else if (state == WL_POINTER_BUTTON_STATE_RELEASED) {
menu->release_count++;
+ }
}
static void