summaryrefslogtreecommitdiffstats
path: root/Objects/capsule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/capsule.c')
-rw-r--r--Objects/capsule.c2
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);