From cd083a1083fb37522408b88e81c757a1c2bd0508 Mon Sep 17 00:00:00 2001 From: Kevin Malachowski Date: Thu, 16 Nov 2017 10:37:57 -0800 Subject: [PATCH] i#2157 re-attach: Ensure drmgr events get reinstalled (#2704) Take care to set the registered_fault bool back to false after event unregister so that it can be re-registered later. Issue #2157 --- ext/drmgr/drmgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/drmgr/drmgr.c b/ext/drmgr/drmgr.c index e0e188466f1..97aa62870eb 100644 --- a/ext/drmgr/drmgr.c +++ b/ext/drmgr/drmgr.c @@ -409,8 +409,10 @@ drmgr_exit(void) if (bb_event_count > 0) dr_unregister_bb_event(drmgr_bb_event); - if (registered_fault) + if (registered_fault) { dr_unregister_restore_state_ex_event(drmgr_restore_state_event); + registered_fault = false; + } #ifdef WINDOWS drmgr_cls_exit(); #endif