summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_interface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index c49e032389..d40c6d2c6e 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -342,10 +342,14 @@ static NTSTATUS pdb_default_create_user(struct pdb_methods *methods,
TALLOC_CTX *tmp_ctx, const char *name,
uint32 acb_info, uint32 *rid)
{
- struct samu *sam_pass = NULL;
+ struct samu *sam_pass;
NTSTATUS status;
struct passwd *pwd;
+ if ((sam_pass = TALLOC_ZERO_P(tmp_ctx, struct samu)) == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
if ( !(pwd = Get_Pwnam_alloc(tmp_ctx, name)) ) {
pstring add_script;
int add_ret;