Skip to content

Commit 5982c7b

Browse files
WarrenWeckessercakedev0
authored andcommitted
BUG: Fix check of PyMem_Calloc return value. (numpy#30176)
1 parent 96e5863 commit 5982c7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

numpy/_core/src/umath/wrapping_array_method.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ get_wrapping_auxdata(void)
114114
}
115115
else {
116116
res = PyMem_Calloc(1, sizeof(wrapping_auxdata));
117-
if (res < 0) {
117+
if (res == NULL) {
118118
PyErr_NoMemory();
119119
return NULL;
120120
}

0 commit comments

Comments
 (0)