Fixed resource leak to scratch when _PyUnicodeWriter_Prepare fails
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 80fe724..7e12b34 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -1628,8 +1628,10 @@
         strlen++;
     }
     if (writer) {
-        if (_PyUnicodeWriter_Prepare(writer, strlen, '9') == -1)
+        if (_PyUnicodeWriter_Prepare(writer, strlen, '9') == -1) {
+            Py_DECREF(scratch);
             return -1;
+        }
         kind = writer->kind;
         str = NULL;
     }