summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb/common/ctdb_ltdb.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-04-07 01:00:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:52 -0500
commit5497a1341cde83567d3513b9a76dc498589299d0 (patch)
tree1c1c4fe4e1a5e25e8014e02e9475395d761aa654 /source4/cluster/ctdb/common/ctdb_ltdb.c
parent98fda45351590fb336f8c0003862d192b9974dce (diff)
downloadsamba-5497a1341cde83567d3513b9a76dc498589299d0.tar.gz
samba-5497a1341cde83567d3513b9a76dc498589299d0.tar.bz2
samba-5497a1341cde83567d3513b9a76dc498589299d0.zip
r22117: merged from bzr
(This used to be commit d7f122df1dba30e46e84e294cccecb2e4ef82072)
Diffstat (limited to 'source4/cluster/ctdb/common/ctdb_ltdb.c')
-rw-r--r--source4/cluster/ctdb/common/ctdb_ltdb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/cluster/ctdb/common/ctdb_ltdb.c b/source4/cluster/ctdb/common/ctdb_ltdb.c
index ceedb6c5ce..84c3bd49da 100644
--- a/source4/cluster/ctdb/common/ctdb_ltdb.c
+++ b/source4/cluster/ctdb/common/ctdb_ltdb.c
@@ -137,7 +137,8 @@ static void ltdb_initial_header(struct ctdb_db_context *ctdb_db,
returned if the record is not present
*/
int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
- TDB_DATA key, struct ctdb_ltdb_header *header, TDB_DATA *data)
+ TDB_DATA key, struct ctdb_ltdb_header *header,
+ TALLOC_CTX *mem_ctx, TDB_DATA *data)
{
TDB_DATA rec;
struct ctdb_context *ctdb = ctdb_db->ctdb;
@@ -158,7 +159,8 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
if (data) {
data->dsize = rec.dsize - sizeof(struct ctdb_ltdb_header);
- data->dptr = talloc_memdup(ctdb_db, sizeof(struct ctdb_ltdb_header)+rec.dptr,
+ data->dptr = talloc_memdup(mem_ctx,
+ sizeof(struct ctdb_ltdb_header)+rec.dptr,
data->dsize);
}