Issue #19437: Fix datetime_subtract(), handle new_delta() failure
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index a89e0ec..1eace71 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -4462,6 +4462,9 @@
             delta_us = DATE_GET_MICROSECOND(left) -
                        DATE_GET_MICROSECOND(right);
             result = new_delta(delta_d, delta_s, delta_us, 1);
+            if (result == NULL)
+                return NULL;
+
             if (offdiff != NULL) {
                 PyObject *temp = result;
                 result = delta_subtract(result, offdiff);