summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-03-25 22:35:20 +0100
committerGünther Deschner <gd@samba.org>2008-03-25 23:36:13 +0100
commite6a1027757ef08a5a780175b93ebdb314e91cdba (patch)
treed1e0ca85f79da42d050c5688e0cb121044ffa1eb
parent689cd9e1012bba0a4e9a7da4bbf8b2833e0f1684 (diff)
downloadsamba-e6a1027757ef08a5a780175b93ebdb314e91cdba.tar.gz
samba-e6a1027757ef08a5a780175b93ebdb314e91cdba.tar.bz2
samba-e6a1027757ef08a5a780175b93ebdb314e91cdba.zip
Fix a valgrind error
In winbind, we're using the info3 struct to send it to the winbind client after netsamlogon_cache_store. Without this info3->base.account_name.string was prematurely freed. (This used to be commit aa4377561b691e2c5108c18aeb34fff39d8775df)
-rw-r--r--source3/libsmb/samlogon_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/samlogon_cache.c b/source3/libsmb/samlogon_cache.c
index 73b570c383..235880910c 100644
--- a/source3/libsmb/samlogon_cache.c
+++ b/source3/libsmb/samlogon_cache.c
@@ -149,7 +149,7 @@ bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3)
/* so we fill it in since winbindd_getpwnam() makes use of it */
if (!info3->base.account_name.string) {
- info3->base.account_name.string = talloc_strdup(mem_ctx, username);
+ info3->base.account_name.string = talloc_strdup(info3, username);
}
r.timestamp = t;