From a1b4f7c92da17a58c2c8a84a957a76af5d7fe1d2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 13 Dec 2017 08:27:33 +0530 Subject: [PATCH] Fix COreText leak on exit --- kitty/core_text.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/core_text.m b/kitty/core_text.m index 3ab5f5eda..8fda412a5 100644 --- a/kitty/core_text.m +++ b/kitty/core_text.m @@ -75,10 +75,11 @@ ct_face(CTFontRef font) { static void dealloc(CTFace* self) { - if (self->ct_font) CFRelease(self->ct_font); if (self->hb_font) hb_font_destroy(self->hb_font); + if (self->ct_font) CFRelease(self->ct_font); self->hb_font = NULL; self->ct_font = NULL; + Py_CLEAR(self->family_name); Py_CLEAR(self->full_name); Py_CLEAR(self->postscript_name); Py_CLEAR(self->path); Py_TYPE(self)->tp_free((PyObject*)self); }