diff options
author | Sébastien Prud'homme <sebastien.prudhomme@gmail.com> | 2009-06-12 09:11:57 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-06-15 10:12:20 +0200 |
commit | 4afb8f741152282c7426592336b2e1e22abc61dd (patch) | |
tree | dcc8e37acff080684aa7a4afc2b4769a15373aa7 | |
parent | efc993a2aa6d0745c5868080640ebea3409b6818 (diff) | |
download | samba-4afb8f741152282c7426592336b2e1e22abc61dd.tar.gz samba-4afb8f741152282c7426592336b2e1e22abc61dd.tar.xz samba-4afb8f741152282c7426592336b2e1e22abc61dd.zip |
s3/idmap: Fix out of memory error with Winbind idmap.
This fixes bug #5945.
(cherry picked from commit a7735416792f8156e53a04af98e7e2dff0b6707d)
-rw-r--r-- | source/winbindd/idmap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/winbindd/idmap.c b/source/winbindd/idmap.c index d601210ecfb..e4fc75ab722 100644 --- a/source/winbindd/idmap.c +++ b/source/winbindd/idmap.c @@ -555,8 +555,12 @@ NTSTATUS idmap_init(void) * set the destructor for this domain */ talloc_set_destructor(dom, close_domain_destructor); - dom->params = talloc_strdup(dom, compat_params); - IDMAP_CHECK_ALLOC(dom->params); + if (compat_params) { + dom->params = talloc_strdup(dom, compat_params); + IDMAP_CHECK_ALLOC(dom->params); + } else { + dom->params = NULL; + } /* Finally instance a backend copy for this domain */ ret = dom->methods->init(dom); |