Backport r67975: #4759: fix segfault in bytearray.translate(x, None).

This commit is contained in:
Georg Brandl 2008-12-28 11:55:24 +00:00
parent 828a7066f1
commit ef29f8634c
3 changed files with 11 additions and 0 deletions

View file

@ -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;
}
}