diff options
author | Andreas Schneider <asn@samba.org> | 2017-07-27 15:55:58 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2017-07-31 09:45:09 +0200 |
commit | 111ac8ebdafacb9370d94bd6eb20ef8ded67ec35 (patch) | |
tree | 471dd08202ccaaac53383646db08fe43b84734a5 | |
parent | 857dba064c93d4dbef77c2ab00fdb8253b2eee89 (diff) | |
download | uid_wrapper-111ac8ebdafacb9370d94bd6eb20ef8ded67ec35.tar.gz uid_wrapper-111ac8ebdafacb9370d94bd6eb20ef8ded67ec35.tar.xz uid_wrapper-111ac8ebdafacb9370d94bd6eb20ef8ded67ec35.zip |
uwrap: Use calloc to allocate groups array
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
-rw-r--r-- | src/uid_wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/uid_wrapper.c b/src/uid_wrapper.c index cb31c5e..b3d12c5 100644 --- a/src/uid_wrapper.c +++ b/src/uid_wrapper.c @@ -749,7 +749,7 @@ static int uwrap_pthread_create(pthread_t *thread, UWRAP_LOCK(uwrap_id); - args->id->groups = malloc(sizeof(gid_t) * src_id->ngroups); + args->id->groups = calloc(src_id->ngroups, sizeof(gid_t)); if (args->id->groups == NULL) { UWRAP_UNLOCK(uwrap_id); SAFE_FREE(args->id); |