summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_interface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 9f3a1725a4..11b70f2bcb 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -352,7 +352,8 @@ static bool guest_user_info( struct samu *user )
NTSTATUS result;
const char *guestname = lp_guestaccount();
- if ( !(pwd = getpwnam_alloc(talloc_autofree_context(), guestname ) ) ) {
+ pwd = getpwnam_alloc(talloc_tos(), guestname);
+ if (pwd == NULL) {
DEBUG(0,("guest_user_info: Unable to locate guest account [%s]!\n",
guestname));
return False;