Issue #20437: Fixed 43 potential bugs when deleting objects references.
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 @@
goto onError;
return;
onError:
- Py_DECREF(*exceptionObject);
- *exceptionObject = NULL;
+ Py_CLEAR(*exceptionObject);
}
}
@@ -4826,8 +4825,7 @@
goto onError;
return;
onError:
- Py_DECREF(*exceptionObject);
- *exceptionObject = NULL;
+ Py_CLEAR(*exceptionObject);
}
}