diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-02-27 21:19:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:51 -0500 |
commit | ded57f29b3e116badb576990155964c56151c5f9 (patch) | |
tree | 5b31c2a855a9ac0d069c4ba847af196646e2bfaf /source3 | |
parent | 447d49be9e42f05211cb77ddc5a8189329791ecf (diff) | |
download | samba-ded57f29b3e116badb576990155964c56151c5f9.tar.gz samba-ded57f29b3e116badb576990155964c56151c5f9.tar.bz2 samba-ded57f29b3e116badb576990155964c56151c5f9.zip |
r13727: Fix a segfault
(This used to be commit 76c100834d125b889d29d0fc38934bed4cc77e19)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/pdb_interface.c | 6 |
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; |