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 | 343f4f8c29f7c8856f7237c7a3cd16785ee6b86b (patch) | |
tree | f84055b3b555a466de311aa9b69eb7cdf04b0c85 | |
parent | 07fcf555ba90278a318df3a7bdc531cf6c6b9881 (diff) | |
download | prosody-343f4f8c29f7c8856f7237c7a3cd16785ee6b86b.tar.gz prosody-343f4f8c29f7c8856f7237c7a3cd16785ee6b86b.zip |
moduleapi: Clear self.event_handlers when unhooking an event, to prevent leaks
-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 |