diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-11-20 09:53:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-11-20 09:53:22 +0300 |
commit | 43eb34ec81fdf0479703a1c817b64a70dc93bbea (patch) | |
tree | cfb8c57f3e9240fb379fc391fe4073f5646b2000 /source | |
parent | 9d8af29267a4190236632d363fa3394d7dee6ae1 (diff) |
Fix T71680: _PyObject_LookupAttr memory leak
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 570c5012ed8..6bc7676973c 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -8688,6 +8688,7 @@ static PyObject *pyrna_register_class(PyObject *UNUSED(self), PyObject *py_class switch (_PyObject_LookupAttr(py_class, bpy_intern_str_register, &py_cls_meth)) { case 1: { PyObject *ret = PyObject_CallObject(py_cls_meth, NULL); + Py_DECREF(py_cls_meth); if (ret) { Py_DECREF(ret); } @@ -8794,6 +8795,7 @@ static PyObject *pyrna_unregister_class(PyObject *UNUSED(self), PyObject *py_cla switch (_PyObject_LookupAttr(py_class, bpy_intern_str_unregister, &py_cls_meth)) { case 1: { PyObject *ret = PyObject_CallObject(py_cls_meth, NULL); + Py_DECREF(py_cls_meth); if (ret) { Py_DECREF(ret); } |