From: Serhiy Storchaka Date: Fri, 21 Apr 2017 07:55:54 +0000 (+0300) Subject: [3.5] bpo-29802: Fix the cleaning up issue in PyUnicode_FSDecoder(). (GH-1217) (... X-Git-Tag: v3.5.4rc1~197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17db4b99b4d300a9b024ba0efdaa46d05d4f4cd3;p=thirdparty%2FPython%2Fcpython.git [3.5] bpo-29802: Fix the cleaning up issue in PyUnicode_FSDecoder(). (GH-1217) (#1219) (cherry picked from commit 7a113a0) --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index d7c9a34c3945..d037d80b3d22 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)) {