From 7a113a0cbf545588d61286fcc0e89141cf211735 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 20 Apr 2017 22:55:06 +0300 Subject: [PATCH] bpo-29802: Fix the cleaning up issue in PyUnicode_FSDecoder(). (#1217) --- Objects/unicodeobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 787104368153..4e0c663e338a 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; } -- 2.47.3