summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-04-21 07:55:54 (GMT)
committerGitHub <noreply@github.com>2017-04-21 07:55:54 (GMT)
commit17db4b99b4d300a9b024ba0efdaa46d05d4f4cd3 (patch)
tree80189fd703d0ae886286548adbfc8268759533d8 /Objects
parented5e0652cad5ae13f33777e822ff0f1aed3942f6 (diff)
downloadcpython-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.c1
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)) {