mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
bpo-46606: Remove redundant +1. (GH-31561)
This commit is contained in:
parent
7d03c8be5a
commit
ad6c7003e3
@ -8186,7 +8186,7 @@ os_setgroups(PyObject *module, PyObject *groups)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gid_t *grouplist = PyMem_New(gid_t, len+1); // Avoid malloc(0)
|
||||
gid_t *grouplist = PyMem_New(gid_t, len);
|
||||
for (Py_ssize_t i = 0; i < len; i++) {
|
||||
PyObject *elem;
|
||||
elem = PySequence_GetItem(groups, i);
|
||||
|
Loading…
Reference in New Issue
Block a user