[PATCH libxcwm 07/15] Fix a use after free of return_evt

Jon TURNEY jon.turney at dronecode.org.uk
Mon Nov 5 14:44:01 PST 2012


Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 src/libxcwm/event_loop.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/libxcwm/event_loop.c b/src/libxcwm/event_loop.c
index 5bcf30e..d6f3bc2 100644
--- a/src/libxcwm/event_loop.c
+++ b/src/libxcwm/event_loop.c
@@ -181,9 +181,9 @@ run_event_loop(void *thread_arg_struct)
                                region);
 
                 return_evt->window->initial_damage = 0;
-                free(return_evt);
                 xcb_xfixes_destroy_region(return_evt->window->context->conn,
                                           region);
+                free(return_evt);
                 xcwm_event_release_thread_lock();
                 continue;
             }
-- 
1.7.9



More information about the xorg-devel mailing list