diff options
author | Alexey Izbyshev <izbyshev@ispras.ru> | 2018-08-22 18:27:32 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2018-08-22 18:27:32 (GMT) |
commit | c583919ffced0a3b6409766fc12f6e28bef4fac7 (patch) | |
tree | ea7247a7dca222c8342573202f4c78c33dd72a11 /Modules | |
parent | e7d4b2f205c711d056bea73a0093e2e2b200544b (diff) | |
download | cpython-c583919ffced0a3b6409766fc12f6e28bef4fac7.zip cpython-c583919ffced0a3b6409766fc12f6e28bef4fac7.tar.gz cpython-c583919ffced0a3b6409766fc12f6e28bef4fac7.tar.bz2 |
bpo-34462: Add missing NULL check to _copy_raw_string() (GH-8863)
Reported by Svace static analyzer.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_xxsubinterpretersmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ _copy_raw_string(PyObject *strobj) return NULL; } char *copied = PyMem_Malloc(strlen(str)+1); - if (str == NULL) { + if (copied == NULL) { PyErr_NoMemory(); return NULL; } |