diff options
author | Georg Brandl <georg@python.org> | 2008-12-28 11:55:24 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-12-28 11:55:24 (GMT) |
commit | ef29f8634ca5415fda7aa75c9c142d3eaf2edebc (patch) | |
tree | 83747d92acba51003a7598774a1a71c81408803a /Objects/bytearrayobject.c | |
parent | 828a7066f12e758c30829363c8ec9018c6c2a94f (diff) | |
download | cpython-ef29f8634ca5415fda7aa75c9c142d3eaf2edebc.zip cpython-ef29f8634ca5415fda7aa75c9c142d3eaf2edebc.tar.gz cpython-ef29f8634ca5415fda7aa75c9c142d3eaf2edebc.tar.bz2 |
Backport r67975: #4759: fix segfault in bytearray.translate(x, None).
Diffstat (limited to 'Objects/bytearrayobject.c')
-rw-r--r-- | Objects/bytearrayobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index d75eb53..56071a0 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -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; } } |