aboutsummaryrefslogtreecommitdiff
path: root/Python/codecs.c
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2018-04-06 15:51:24 +0900
committerGitHub <noreply@github.com>2018-04-06 15:51:24 +0900
commit0c1c4563a65ac451021d927058e4f25013934eb2 (patch)
tree144630102850a416a8572266e1466bf875f186d1 /Python/codecs.c
parent01b731fc2b04744a11e32f93aba8bfb9ddb3dd29 (diff)
downloadcpython3-0c1c4563a65ac451021d927058e4f25013934eb2.tar.gz
bpo-33231: Fix potential leak in normalizestring() (GH-6386)
Diffstat (limited to 'Python/codecs.c')
-rw-r--r--Python/codecs.c2
1 files changed, 0 insertions, 2 deletions
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;
}