mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
Fix PyUnicode_FromFormatV() error handling
Issue #28233: Fix a memory leak if the format string contains a non-ASCII character, destroy the unicode writer.
This commit is contained in:
parent
0256f42839
commit
1ddf53d496
1 changed files with 1 additions and 1 deletions
|
@ -2719,7 +2719,7 @@ PyUnicode_FromFormatV(const char *format, va_list vargs)
|
||||||
"PyUnicode_FromFormatV() expects an ASCII-encoded format "
|
"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)*p);
|
(unsigned char)*p);
|
||||||
return NULL;
|
goto fail;
|
||||||
}
|
}
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue