Fix memory leaks in Python gizmo get/set handlers
This commit is contained in:
parent
3c50687073
commit
d5fd09ab58
Notes:
blender-bot
2023-02-14 01:07:44 +01:00
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
|
@ -103,6 +103,8 @@ fail:
|
|||
PyErr_Print();
|
||||
PyErr_Clear();
|
||||
|
||||
Py_DECREF(ret);
|
||||
|
||||
PyGILState_Release(gilstate);
|
||||
}
|
||||
|
||||
|
@ -139,6 +141,7 @@ static void py_rna_gizmo_handler_set_cb(const wmGizmo *UNUSED(gz),
|
|||
if (ret == NULL) {
|
||||
goto fail;
|
||||
}
|
||||
Py_DECREF(args);
|
||||
Py_DECREF(ret);
|
||||
|
||||
PyGILState_Release(gilstate);
|
||||
|
@ -199,11 +202,11 @@ static void py_rna_gizmo_handler_range_get_cb(const wmGizmo *UNUSED(gz),
|
|||
return;
|
||||
|
||||
fail:
|
||||
Py_XDECREF(ret);
|
||||
|
||||
PyErr_Print();
|
||||
PyErr_Clear();
|
||||
|
||||
Py_XDECREF(ret);
|
||||
|
||||
PyGILState_Release(gilstate);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue