diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-04-20 18:19:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-20 18:19:31 (GMT) |
commit | 40db90c1ce1a59d5f5f2894bb0ce32110000bf27 (patch) | |
tree | 0436658cf04e8ebd902a9bc1851b21ee7b98bf45 /Objects | |
parent | 8f5cdfa9fc1bb6b4d9a33fc281987252f6398430 (diff) | |
download | cpython-40db90c1ce1a59d5f5f2894bb0ce32110000bf27.zip cpython-40db90c1ce1a59d5f5f2894bb0ce32110000bf27.tar.gz cpython-40db90c1ce1a59d5f5f2894bb0ce32110000bf27.tar.bz2 |
bpo-29802: Fix reference counting in module-level struct functions (#1213)
when pass arguments of wrong type.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index ef2215f..b680421 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3907,6 +3907,7 @@ PyUnicode_FSDecoder(PyObject* arg, void* addr) PyObject *output = NULL; if (arg == NULL) { Py_DECREF(*(PyObject**)addr); + *(PyObject**)addr = NULL; return 1; } |