summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_tdb.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-20 13:53:14 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-20 12:31:05 +0000
commit06053a09cbf42cde12d69d0a296fb25f425aae67 (patch)
tree10d383ec861921c16e507384476817f2088651d5 /source4/lib/ldb/ldb_tdb/ldb_tdb.c
parent1427895531c259f4bb6c561972b79051807c2a4d (diff)
downloadsamba-06053a09cbf42cde12d69d0a296fb25f425aae67.tar.gz
samba-06053a09cbf42cde12d69d0a296fb25f425aae67.tar.bz2
samba-06053a09cbf42cde12d69d0a296fb25f425aae67.zip
ldb:ldb_tdb submodule - use "ldb_msg_new" where appropriate
It is saver than a manual "talloc".
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_tdb.c')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 1637c66734..25ec1b0bf2 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -373,7 +373,7 @@ static int ltdb_delete_internal(struct ldb_module *module, struct ldb_dn *dn)
struct ldb_message *msg;
int ret = LDB_SUCCESS;
- msg = talloc(module, struct ldb_message);
+ msg = ldb_msg_new(module);
if (msg == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -629,7 +629,7 @@ int ltdb_modify_internal(struct ldb_module *module,
return ltdb_err_map(tdb_error(ltdb->tdb));
}
- msg2 = talloc(tdb_key.dptr, struct ldb_message);
+ msg2 = ldb_msg_new(tdb_key.dptr);
if (msg2 == NULL) {
free(tdb_data.dptr);
ret = LDB_ERR_OTHER;
@@ -912,7 +912,7 @@ static int ltdb_rename(struct ltdb_context *ctx)
return LDB_ERR_OPERATIONS_ERROR;
}
- msg = talloc(ctx, struct ldb_message);
+ msg = ldb_msg_new(ctx);
if (msg == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -1070,7 +1070,7 @@ static int ltdb_sequence_number(struct ltdb_context *ctx,
dn = ldb_dn_new(tmp_ctx, ldb, LTDB_BASEINFO);
- msg = talloc(tmp_ctx, struct ldb_message);
+ msg = ldb_msg_new(tmp_ctx);
if (msg == NULL) {
ret = LDB_ERR_OPERATIONS_ERROR;
goto done;