diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-04-21 07:55:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-21 07:55:54 (GMT) |
commit | 17db4b99b4d300a9b024ba0efdaa46d05d4f4cd3 (patch) | |
tree | 80189fd703d0ae886286548adbfc8268759533d8 /Objects | |
parent | ed5e0652cad5ae13f33777e822ff0f1aed3942f6 (diff) | |
download | cpython-17db4b99b4d300a9b024ba0efdaa46d05d4f4cd3.zip cpython-17db4b99b4d300a9b024ba0efdaa46d05d4f4cd3.tar.gz cpython-17db4b99b4d300a9b024ba0efdaa46d05d4f4cd3.tar.bz2 |
[3.5] bpo-29802: Fix the cleaning up issue in PyUnicode_FSDecoder(). (GH-1217) (#1219)
(cherry picked from commit 7a113a0)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index d7c9a34..d037d80 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3654,6 +3654,7 @@ PyUnicode_FSDecoder(PyObject* arg, void* addr) PyObject *output = NULL; if (arg == NULL) { Py_DECREF(*(PyObject**)addr); + *(PyObject**)addr = NULL; return 1; } if (PyUnicode_Check(arg)) { |