commit | 1ddf53d496a3b7bd09fe8672daa2f07a4d240f2c | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@gmail.com> | Wed Sep 21 14:13:14 2016 +0200 |
committer | Victor Stinner <victor.stinner@gmail.com> | Wed Sep 21 14:13:14 2016 +0200 |
tree | b75f349762f163bf5106138179013871195e1841 | |
parent | 0256f4283987276796129b09905e71a7e3c590d3 [diff] |
Fix PyUnicode_FromFormatV() error handling Issue #28233: Fix a memory leak if the format string contains a non-ASCII character, destroy the unicode writer.
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() expects an ASCII-encoded format " "string, got a non-ASCII byte: 0x%02x", (unsigned char)*p); - return NULL; + goto fail; } p++; }