Issue #9738, #9836: Fix refleak introduced by r84704
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 3b0a66a..92df1ce 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -767,9 +767,9 @@
else if (128 <= (unsigned char)*f) {
PyErr_Format(PyExc_ValueError,
"PyUnicode_FromFormatV() expects an ASCII-encoded format "
- "string, got a non-ascii byte: 0x%02x",
+ "string, got a non-ASCII byte: 0x%02x",
(unsigned char)*f);
- return NULL;
+ goto fail;
}
}
/* step 2: allocate memory for the results of