1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

fixed typo in getgroups code

This commit is contained in:
Andrew Tridgell -
parent 23f71b979a
commit 046e8a5021

View File

@ -673,7 +673,9 @@ int sys_getgroups(int setlen, gid_t *gidset)
return -1;
}
if((group_list = (GID_T *)malloc(setlen * sizoef(GID_T))) == NULL) {
if (setlen == 0) setlen = 1;
if((group_list = (GID_T *)malloc(setlen * sizeof(GID_T))) == NULL) {
DEBUG(0,("sys_getgroups: Malloc fail.\n"));
return -1;
}