summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_interface.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-11-14 13:42:54 +0100
committerVolker Lendecke <vl@samba.org>2008-11-14 20:27:46 +0100
commit3c98d5bd987358b1cbeb81fa8db37b97492cf0cc (patch)
tree0058070438a145865d8b2cf80697bd3d2a1d999a /source3/passdb/pdb_interface.c
parentf50ad767505cc8847f5f574767b664b57326e468 (diff)
downloadsamba-3c98d5bd987358b1cbeb81fa8db37b97492cf0cc.tar.gz
samba-3c98d5bd987358b1cbeb81fa8db37b97492cf0cc.tar.bz2
samba-3c98d5bd987358b1cbeb81fa8db37b97492cf0cc.zip
Make memcache_add_talloc NULL out the source pointer
This is an orthogonality measure to make clear this pointer now belongs to the cache. (cherry picked from commit e6080c6e87d6fe3995b121a772bf3f6343fa666f)
Diffstat (limited to 'source3/passdb/pdb_interface.c')
-rw-r--r--source3/passdb/pdb_interface.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 6fe105854f..5a79f09db0 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -207,28 +207,28 @@ static struct pdb_methods *pdb_get_methods(void)
bool pdb_getsampwnam(struct samu *sam_acct, const char *username)
{
struct pdb_methods *pdb = pdb_get_methods();
- struct samu *cache_copy;
+ struct samu *for_cache;
const struct dom_sid *user_sid;
if (!NT_STATUS_IS_OK(pdb->getsampwnam(pdb, sam_acct, username))) {
return False;
}
- cache_copy = samu_new(NULL);
- if (cache_copy == NULL) {
+ for_cache = samu_new(NULL);
+ if (for_cache == NULL) {
return False;
}
- if (!pdb_copy_sam_account(cache_copy, sam_acct)) {
- TALLOC_FREE(cache_copy);
+ if (!pdb_copy_sam_account(for_cache, sam_acct)) {
+ TALLOC_FREE(for_cache);
return False;
}
- user_sid = pdb_get_user_sid(cache_copy);
+ user_sid = pdb_get_user_sid(for_cache);
memcache_add_talloc(NULL, PDB_GETPWSID_CACHE,
data_blob_const(user_sid, sizeof(*user_sid)),
- cache_copy);
+ &for_cache);
return True;
}