mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-46606: Remove redundant +1. (GH-31561)
This commit is contained in:
parent
7d03c8be5a
commit
ad6c7003e3
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue