linux: setgroups16(): Pre-extend the groups array
For the size we know we will need in the end. No functional change (intended). MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52279
This commit is contained in:
@@ -102,6 +102,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args)
|
||||
}
|
||||
|
||||
newcred = crget();
|
||||
crextend(newcred, ngrp);
|
||||
p = td->td_proc;
|
||||
PROC_LOCK(p);
|
||||
oldcred = crcopysafe(p, newcred);
|
||||
|
||||
Reference in New Issue
Block a user