diff Python/bltinmodule.c @ 27675:8f8448fb58d6 legacy-trunk

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)
author Walter Dörwald <walter@livinglogic.de>
date Tue, 04 Feb 2003 16:57:49 +0000
parents ce3faab06de7
children e5454fe1aafd
line wrap: on
line diff
--- a/Python/bltinmodule.c	Tue Feb 04 16:28:00 2003 +0000
+++ b/Python/bltinmodule.c	Tue Feb 04 16:57:49 2003 +0000
@@ -2028,7 +2028,7 @@
 						need = 2*outlen;
 					if (PyUnicode_Resize(&result, need)) {
 						Py_DECREF(item);
-						return NULL;
+						goto Fail_1;
 					}
 					outlen = need;
 				}