From 5adacb43f3f98e060f57ce34e6e8b905b321dbaa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Baumbach?= Date: Mon, 14 Apr 2014 14:42:56 +0200 Subject: [PATCH] s3: use smb_xmemdup instead of smb_memdup and smb_panic MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Baumbach Reviewed-by: Volker Lendecke Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Apr 16 22:53:42 CEST 2014 on sn-devel-104 --- source3/smbd/sec_ctx.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c index c34247e615a..5dda07e6c08 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; } -- 2.11.4.GIT