From 531e000d2e6c15b7a83018d8c663770c012ee98e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Walter=20D=C3=B6rwald?= Date: Tue, 4 Feb 2003 16:57:49 +0000 Subject: [PATCH] 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) --- Python/bltinmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index c273012aa1..2383b4fdd0 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; } -- 2.40.0