summaryrefslogtreecommitdiffstats
path: root/source3/smbd/sec_ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/sec_ctx.c')
-rw-r--r--source3/smbd/sec_ctx.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c
index c34247e615..5dda07e6c0 100644
--- a/source3/smbd/sec_ctx.c
+++ b/source3/smbd/sec_ctx.c
@@ -331,11 +331,8 @@ void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, const struct
TALLOC_FREE(ctx_p->token);
if (ngroups) {
- ctx_p->ut.groups = (gid_t *)smb_memdup(groups,
- sizeof(gid_t) * ngroups);
- if (!ctx_p->ut.groups) {
- smb_panic("memdup failed");
- }
+ ctx_p->ut.groups = (gid_t *)smb_xmemdup(groups,
+ sizeof(gid_t) * ngroups);
} else {
ctx_p->ut.groups = NULL;
}