diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-09 11:14:04 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-09 11:14:04 (GMT) |
| commit | 98a9722e4a82b5f7dc0411233bbec892a02c7667 (patch) | |
| tree | 51179bb7d80e822a18d0ccbb41fde7198f424813 /Objects/unicodeobject.c | |
| parent | 2cfae9b03f706e0d6889dfecc21f87419d926b00 (diff) | |
| download | cpython-98a9722e4a82b5f7dc0411233bbec892a02c7667.zip cpython-98a9722e4a82b5f7dc0411233bbec892a02c7667.tar.gz cpython-98a9722e4a82b5f7dc0411233bbec892a02c7667.tar.bz2 | |
Issue #20437: Fixed 43 potential bugs when deleting objects references.
Diffstat (limited to 'Objects/unicodeobject.c')
| -rw-r--r-- | Objects/unicodeobject.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 5ce9c88..09e41b9 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3520,8 +3520,7 @@ static void make_encode_exception(PyObject **exceptionObject, goto onError; return; onError: - Py_DECREF(*exceptionObject); - *exceptionObject = NULL; + Py_CLEAR(*exceptionObject); } } @@ -4826,8 +4825,7 @@ static void make_translate_exception(PyObject **exceptionObject, goto onError; return; onError: - Py_DECREF(*exceptionObject); - *exceptionObject = NULL; + Py_CLEAR(*exceptionObject); } } |
