commit | c583919ffced0a3b6409766fc12f6e28bef4fac7 | [log] [tgz] |
---|---|---|
author | Alexey Izbyshev <izbyshev@ispras.ru> | Wed Aug 22 21:27:32 2018 +0300 |
committer | Berker Peksag <berker.peksag@gmail.com> | Wed Aug 22 21:27:32 2018 +0300 |
tree | ea7247a7dca222c8342573202f4c78c33dd72a11 | |
parent | e7d4b2f205c711d056bea73a0093e2e2b200544b [diff] |
bpo-34462: Add missing NULL check to _copy_raw_string() (GH-8863) Reported by Svace static analyzer.
diff --git a/Modules/_xxsubinterpretersmodule.c b/Modules/_xxsubinterpretersmodule.c index 6162c53..7b2cda2 100644 --- a/Modules/_xxsubinterpretersmodule.c +++ b/Modules/_xxsubinterpretersmodule.c
@@ -15,7 +15,7 @@ return NULL; } char *copied = PyMem_Malloc(strlen(str)+1); - if (str == NULL) { + if (copied == NULL) { PyErr_NoMemory(); return NULL; }