1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

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.
This commit is contained in:
Matthias Dieter Wallnöfer 2010-11-01 12:59:51 +01:00
parent 9b0f8a8e5f
commit 3eb0311aa6

View File

@ -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) {