mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Issue #15219: Fix a reference leak when hashlib.new() is called with
invalid parameters.
This commit is contained in:
parent
45f0d9835c
commit
d958cc960f
3 changed files with 6 additions and 6 deletions
|
|
@ -477,6 +477,7 @@ EVP_new(PyObject *self, PyObject *args, PyObject *kwdict)
|
|||
}
|
||||
|
||||
if (!PyArg_Parse(name_obj, "s", &name)) {
|
||||
PyBuffer_Release(&view);
|
||||
PyErr_SetString(PyExc_TypeError, "name must be a string");
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue