summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-04-20 19:55:06 (GMT)
committerGitHub <noreply@github.com>2017-04-20 19:55:06 (GMT)
commit7a113a0cbf545588d61286fcc0e89141cf211735 (patch)
tree7a4c869a8e934baca9e319105d2de4901d2516c5
parent430020500c56259d31e07d32771f017952bad4e0 (diff)
downloadcpython-7a113a0cbf545588d61286fcc0e89141cf211735.zip
cpython-7a113a0cbf545588d61286fcc0e89141cf211735.tar.gz
cpython-7a113a0cbf545588d61286fcc0e89141cf211735.tar.bz2
bpo-29802: Fix the cleaning up issue in PyUnicode_FSDecoder(). (#1217)
-rw-r--r--Objects/unicodeobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 7871043..4e0c663 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3902,6 +3902,7 @@ PyUnicode_FSDecoder(PyObject* arg, void* addr)
PyObject *output = NULL;
if (arg == NULL) {
Py_DECREF(*(PyObject**)addr);
+ *(PyObject**)addr = NULL;
return 1;
}