diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index c306f0000e6..31950ffb228 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -113,9 +113,10 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args) return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); - if (error) + if (error) { free(linux_gidset, M_TEMP); return (error); + } newcred = crget(); p = td->td_proc; PROC_LOCK(p);