Kaydet (Commit) c583919f authored tarafından Alexey Izbyshev's avatar Alexey Izbyshev Kaydeden (comit) Berker Peksag

bpo-34462: Add missing NULL check to _copy_raw_string() (GH-8863)

Reported by Svace static analyzer.
üst e7d4b2f2
......@@ -15,7 +15,7 @@ _copy_raw_string(PyObject *strobj)
return NULL;
}
char *copied = PyMem_Malloc(strlen(str)+1);
if (str == NULL) {
if (copied == NULL) {
PyErr_NoMemory();
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment