Fix a possible refleak in tupleobject.c (GH-19018)

diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 14ab53f..839667a 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -737,8 +737,10 @@
         return NULL;
     assert(PyTuple_Check(tmp));
     newobj = type->tp_alloc(type, n = PyTuple_GET_SIZE(tmp));
-    if (newobj == NULL)
+    if (newobj == NULL) {
+        Py_DECREF(tmp);
         return NULL;
+    }
     for (i = 0; i < n; i++) {
         item = PyTuple_GET_ITEM(tmp, i);
         Py_INCREF(item);