diff options
author | Zackery Spytz <zspytz@gmail.com> | 2018-12-07 10:11:30 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-12-07 10:11:30 (GMT) |
commit | 4c49da0cb7434c676d70b9ccf38aca82ac0d64a9 (patch) | |
tree | aae3660f9a5bc462830107cf2311b2557898e268 /Objects | |
parent | 3a521f0b6167628f975c773b56c7daf8d33d6f40 (diff) | |
download | cpython-4c49da0cb7434c676d70b9ccf38aca82ac0d64a9.zip cpython-4c49da0cb7434c676d70b9ccf38aca82ac0d64a9.tar.gz cpython-4c49da0cb7434c676d70b9ccf38aca82ac0d64a9.tar.bz2 |
bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015)
Set MemoryError when appropriate, add missing failure checks,
and fix some potential leaks.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/capsule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/capsule.c b/Objects/capsule.c index acd3de6..4e15b44 100644 --- a/Objects/capsule.c +++ b/Objects/capsule.c @@ -201,7 +201,7 @@ PyCapsule_Import(const char *name, int no_block) char *name_dup = (char *)PyMem_MALLOC(name_length); if (!name_dup) { - return NULL; + return PyErr_NoMemory(); } memcpy(name_dup, name, name_length); |