summaryrefslogtreecommitdiffstats
path: root/source3/smbd
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2014-04-14 14:42:56 +0200
committerJeremy Allison <jra@samba.org>2014-04-16 22:53:42 +0200
commit5adacb43f3f98e060f57ce34e6e8b905b321dbaa (patch)
tree27de245efbe75329e8cd72e3a6e0866274cc7128 /source3/smbd
parentfae7e5d771d1c69bded1189b23335647023fa0f7 (diff)
downloadsamba-5adacb43f3f98e060f57ce34e6e8b905b321dbaa.tar.gz
samba-5adacb43f3f98e060f57ce34e6e8b905b321dbaa.tar.xz
samba-5adacb43f3f98e060f57ce34e6e8b905b321dbaa.zip
s3: use smb_xmemdup instead of smb_memdup and smb_panic
Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Apr 16 22:53:42 CEST 2014 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-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 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;
}