mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
Backport r67975: #4759: fix segfault in bytearray.translate(x, None).
This commit is contained in:
parent
828a7066f1
commit
ef29f8634c
3 changed files with 11 additions and 0 deletions
|
@ -1465,6 +1465,7 @@ bytes_translate(PyByteArrayObject *self, PyObject *args)
|
|||
if (delobj != NULL) {
|
||||
if (_getbuffer(delobj, &vdel) < 0) {
|
||||
result = NULL;
|
||||
delobj = NULL; /* don't try to release vdel buffer on exit */
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue