git.samba.org
/
uid_wrapper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
857dba0
)
uwrap: Use calloc to allocate groups array
author
Andreas Schneider
<asn@samba.org>
Thu, 27 Jul 2017 13:55:58 +0000
(15:55 +0200)
committer
Andreas Schneider
<asn@samba.org>
Mon, 31 Jul 2017 07:45:09 +0000
(09:45 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
src/uid_wrapper.c
patch
|
blob
|
history
diff --git
a/src/uid_wrapper.c
b/src/uid_wrapper.c
index cb31c5e8b009e25812959972f870845e6004019d..b3d12c570278a059b8ea036ed2582d6c2555e06a 100644
(file)
--- 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);