diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2016-09-21 12:13:14 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2016-09-21 12:13:14 (GMT) |
| commit | 1ddf53d496a3b7bd09fe8672daa2f07a4d240f2c (patch) | |
| tree | b75f349762f163bf5106138179013871195e1841 | |
| parent | 0256f4283987276796129b09905e71a7e3c590d3 (diff) | |
| download | cpython-1ddf53d496a3b7bd09fe8672daa2f07a4d240f2c.zip cpython-1ddf53d496a3b7bd09fe8672daa2f07a4d240f2c.tar.gz cpython-1ddf53d496a3b7bd09fe8672daa2f07a4d240f2c.tar.bz2 | |
Fix PyUnicode_FromFormatV() error handling
Issue #28233: Fix a memory leak if the format string contains a non-ASCII
character, destroy the unicode writer.
| -rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index af04564..176ec13 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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++; } |
