From 3c98d5bd987358b1cbeb81fa8db37b97492cf0cc Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 14 Nov 2008 13:42:54 +0100 Subject: 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) --- source3/passdb/pdb_interface.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source3/passdb/pdb_interface.c') 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; } -- cgit