Fix memory leaks in Python gizmo get/set handlers
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user