mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
DECREF on exception raise
This commit is contained in:
@@ -19,12 +19,14 @@ void set_brotli_exception(const char *message) {
|
||||
PyErr_Print();
|
||||
return;
|
||||
}
|
||||
Py_DECREF(module);
|
||||
PyObject *obj = PyObject_GetAttrString(module, "error");
|
||||
if (!obj) {
|
||||
PyErr_Print();
|
||||
return;
|
||||
}
|
||||
PyErr_SetString(obj, message);
|
||||
Py_DECREF(obj);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user