diff options
author | Walter Dörwald <walter@livinglogic.de> | 2003-02-04 16:57:49 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2003-02-04 16:57:49 (GMT) |
commit | 531e000d2e6c15b7a83018d8c663770c012ee98e (patch) | |
tree | 3d0d06ef0b442565b5e18de77ce1a71408d4af2f /Python | |
parent | 903f1e0c40cd25489cdf8856ccb1bb8932c819f8 (diff) | |
download | cpython-531e000d2e6c15b7a83018d8c663770c012ee98e.zip cpython-531e000d2e6c15b7a83018d8c663770c012ee98e.tar.gz cpython-531e000d2e6c15b7a83018d8c663770c012ee98e.tar.bz2 |
PyUnicode_Resize() doesn't free its argument in case of a failure,
so we can jump to the error handling code that does.
(Spotted by Neal Norwitz)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index c273012..2383b4f 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2028,7 +2028,7 @@ filterunicode(PyObject *func, PyObject *strobj) need = 2*outlen; if (PyUnicode_Resize(&result, need)) { Py_DECREF(item); - return NULL; + goto Fail_1; } outlen = need; } |