Skip to content

Commit b7f3245

Browse files
Also decref 'message' and 'filename'
1 parent 5c5100a commit b7f3245

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Python/_warnings.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,8 @@ PyErr_WarnExplicit(PyObject *category, const char *text,
13191319
int ret = PyErr_WarnExplicitObject(category, message, filename, lineno,
13201320
module, registry);
13211321
Py_XDECREF(module);
1322+
Py_DECREF(filename);
1323+
Py_DECREF(message);
13221324
return ret;
13231325
}
13241326

0 commit comments

Comments
 (0)