diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-10-05 08:42:41 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-10-05 08:42:41 +0000 |
commit | 046e8a50219ca69ab326fa672c5fcb1ab3689b3b (patch) | |
tree | f8e17b31223ca73d2436f543929474093dee37a6 /source/lib/system.c | |
parent | 23f71b979ad7dcfbf461fa4f261ab9dbd0b602fb (diff) | |
download | samba-046e8a50219ca69ab326fa672c5fcb1ab3689b3b.tar.gz samba-046e8a50219ca69ab326fa672c5fcb1ab3689b3b.tar.xz samba-046e8a50219ca69ab326fa672c5fcb1ab3689b3b.zip |
fixed typo in getgroups code
Diffstat (limited to 'source/lib/system.c')
-rw-r--r-- | source/lib/system.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/lib/system.c b/source/lib/system.c index 4009e63169b..deca7e1b6a9 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -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; } |