summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb/pdb_interface.c')
-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 ed6a91cb2b..198960550b 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -1570,11 +1570,12 @@ static bool lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32 rid,
return True;
}
- pw = Get_Pwnam(*name);
+ pw = Get_Pwnam_alloc(talloc_tos(), *name);
if (pw == NULL) {
return False;
}
unix_id->uid = pw->pw_uid;
+ TALLOC_FREE(pw);
return True;
}
TALLOC_FREE(sam_account);