diff options
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samldb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index 44c8fee29f..b5e8187c78 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -1109,7 +1109,7 @@ static int samldb_prim_group_change(struct samldb_ctx *ac) } /* Remove the "member" attribute on the new primary group */ - msg = talloc_zero(ac, struct ldb_message); + msg = ldb_msg_new(ac->msg); if (msg == NULL) { return ldb_module_oom(ac->module); } @@ -1125,9 +1125,10 @@ static int samldb_prim_group_change(struct samldb_ctx *ac) if (ret != LDB_SUCCESS) { return ret; } + talloc_free(msg); /* Add a "member" attribute for the previous primary group */ - msg = talloc_zero(ac, struct ldb_message); + msg = ldb_msg_new(ac->msg); if (msg == NULL) { return ldb_module_oom(ac->module); } @@ -1143,6 +1144,7 @@ static int samldb_prim_group_change(struct samldb_ctx *ac) if (ret != LDB_SUCCESS) { return ret; } + talloc_free(msg); } talloc_free(res); |