From 4ccd2afd78cb98e7ff5f8bf77eb8fdc31888b1da Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 10 Apr 2021 11:49:39 +0530 Subject: [PATCH] Free ChildMonitor at end of dealloc --- kitty/child-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/child-monitor.c b/kitty/child-monitor.c index b4ecac771..02275c107 100644 --- a/kitty/child-monitor.c +++ b/kitty/child-monitor.c @@ -163,7 +163,6 @@ dealloc(ChildMonitor* self) { pthread_mutex_destroy(&talk_lock); Py_CLEAR(self->dump_callback); Py_CLEAR(self->death_notify); - Py_TYPE(self)->tp_free((PyObject*)self); while (remove_queue_count) { remove_queue_count--; FREE_CHILD(remove_queue[remove_queue_count]); @@ -173,6 +172,7 @@ dealloc(ChildMonitor* self) { FREE_CHILD(add_queue[add_queue_count]); } free_loop_data(&self->io_loop_data); + Py_TYPE(self)->tp_free((PyObject*)self); } static void