]> granicus.if.org Git - python/commitdiff
bpo-29802: Fix the cleaning up issue in PyUnicode_FSDecoder(). (#1217)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 20 Apr 2017 19:55:06 +0000 (22:55 +0300)
committerGitHub <noreply@github.com>
Thu, 20 Apr 2017 19:55:06 +0000 (22:55 +0300)
Objects/unicodeobject.c

index 7871043681533da30f0644a267be05a380fc3ad9..4e0c663e338a5269c1d1b280af999a9a4b90e31c 100644 (file)
@@ -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;
     }