summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-01 12:59:51 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-01 14:53:25 +0100
commit3eb0311aa6c3ea09e46b71728eababe0d60c0aca (patch)
tree7d2f964f2617367c8f785204dfcdf74387184830 /source4/dsdb/samdb
parent9b0f8a8e5ff578c0eb231fea80943f2a72dd7286 (diff)
downloadsamba-3eb0311aa6c3ea09e46b71728eababe0d60c0aca.tar.gz
samba-3eb0311aa6c3ea09e46b71728eababe0d60c0aca.tar.bz2
samba-3eb0311aa6c3ea09e46b71728eababe0d60c0aca.zip
s4:samldb LDB module - "sAMAccountName" checker
We need a "talloc_steal" for the retrieved "sAMAccountName" since the memory is afterwards freed using the "talloc_free" call.
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 43602cec53..7a5beda60b 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -1384,8 +1384,8 @@ static int samldb_sam_accountname_check(struct samldb_ctx *ac)
if (ret != LDB_SUCCESS) {
return ret;
}
- sam_accountname = ldb_msg_find_attr_as_string(tmp_msg, "sAMAccountName",
- NULL);
+ sam_accountname = talloc_steal(ac,
+ ldb_msg_find_attr_as_string(tmp_msg, "sAMAccountName", NULL));
talloc_free(tmp_msg);
if (sam_accountname == NULL) {