diff options
author | Matthew Wild <mwild1@gmail.com> | 2015-05-06 19:01:16 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2015-05-06 19:01:16 +0100 |
commit | d08df18e9c6daaf764b3aafff523e2e83c38b4dc (patch) | |
tree | f84055b3b555a466de311aa9b69eb7cdf04b0c85 /core | |
parent | 3da0331d8aeaa87c7d7924f7d3d3653c1f11047e (diff) | |
download | prosody-d08df18e9c6daaf764b3aafff523e2e83c38b4dc.tar.gz prosody-d08df18e9c6daaf764b3aafff523e2e83c38b4dc.zip |
moduleapi: Clear self.event_handlers when unhooking an event, to prevent leaks
Diffstat (limited to 'core')
-rw-r--r-- | core/moduleapi.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua index 11d1fdc1..c7fadc27 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -94,6 +94,7 @@ function api:hook_object_event(object, event, handler, priority) end function api:unhook_object_event(object, event, handler) + self.event_handlers:set(object, event, handler, nil); return object.remove_handler(event, handler); end |