summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-12-13 02:15:05 +0900
committerKoichi Sasada <ko1@atdot.net>2021-12-15 02:31:58 +0900
commit2e6e2fd9da18b74aa9555d09a871b24895e42773 (patch)
tree5efb6f4618b6d61d50b2e4efd2893a88af81729b /vm_core.h
parentb8f7fc361d2cf2266e39e97c57bba6edd6c6edaf (diff)
fix local TP memory leak
It free `rb_hook_list_t` itself if needed. To recognize the need, this patch introduced `rb_hook_list_t::is_local` flag. This patch is succession of https://github.com/ruby/ruby/pull/4652
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5253
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_core.h b/vm_core.h
index 78d06012a1..6bbce23078 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -609,8 +609,9 @@ void rb_objspace_call_finalizer(struct rb_objspace *);
typedef struct rb_hook_list_struct {
struct rb_event_hook_struct *hooks;
rb_event_flag_t events;
- unsigned int need_clean;
unsigned int running;
+ bool need_clean;
+ bool is_local;
} rb_hook_list_t;