summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-11-15 21:57:39 -0800
committerBenjamin Peterson <benjamin@python.org>2015-11-15 21:57:39 -0800
commita4d33b34286e30819b36cc9e6d357d16eca813e4 (patch)
tree0a453f048b32924061fc3077bfd8218e5895e90b /Objects/unicodeobject.c
parentd0a5b1c3432574c248dfd86e583b5cd09503a374 (diff)
downloadcpython-git-a4d33b34286e30819b36cc9e6d357d16eca813e4.tar.gz
make the PyUnicode_FSConverter cleanup set the decrefed argument to NULL (closes #25630)
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 38f765da72..8b885dfec2 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3614,6 +3614,7 @@ PyUnicode_FSConverter(PyObject* arg, void* addr)
void *data;
if (arg == NULL) {
Py_DECREF(*(PyObject**)addr);
+ *(PyObject**)addr = NULL;
return 1;
}
if (PyBytes_Check(arg)) {