summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2003-02-04 16:57:49 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2003-02-04 16:57:49 (GMT)
commit531e000d2e6c15b7a83018d8c663770c012ee98e (patch)
tree3d0d06ef0b442565b5e18de77ce1a71408d4af2f /Python/bltinmodule.c
parent903f1e0c40cd25489cdf8856ccb1bb8932c819f8 (diff)
downloadcpython-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/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c2
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;
}