From 0c1c4563a65ac451021d927058e4f25013934eb2 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Fri, 6 Apr 2018 15:51:24 +0900 Subject: bpo-33231: Fix potential leak in normalizestring() (GH-6386) --- Python/codecs.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'Python/codecs.c') diff --git a/Python/codecs.c b/Python/codecs.c index 223ccca603..eb3cd35fb8 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -78,8 +78,6 @@ PyObject *normalizestring(const char *string) } p[i] = '\0'; v = PyUnicode_FromString(p); - if (v == NULL) - return NULL; PyMem_Free(p); return v; } -- cgit v1.2.1