bpo-33231: Fix potential leak in normalizestring() (GH-6386)

This commit is contained in:
INADA Naoki 2018-04-06 15:51:24 +09:00 committed by GitHub
parent 01b731fc2b
commit 0c1c4563a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -0,0 +1 @@
Fix potential memory leak in ``normalizestring()``.

View File

@ -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;
}