Commit 1ddf53d4 authored by Victor Stinner's avatar Victor Stinner

Fix PyUnicode_FromFormatV() error handling

Issue #28233: Fix a memory leak if the format string contains a non-ASCII
character, destroy the unicode writer.
parent 0256f428
......@@ -2719,7 +2719,7 @@ PyUnicode_FromFormatV(const char *format, va_list vargs)
"PyUnicode_FromFormatV() expects an ASCII-encoded format "
"string, got a non-ASCII byte: 0x%02x",
(unsigned char)*p);
return NULL;
goto fail;
}
p++;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment