diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-03-05 12:24:35 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-03-05 12:24:35 +1100 |
commit | 41760c18bdab20d526d32568531bdf7c88272879 (patch) | |
tree | b2f421919501a3061afe40f0cb0980f86f448ea8 /source3/lib/dbwrap_rbt.c | |
parent | 8249383efb2037bb234dd040ebe151329cc4feb9 (diff) | |
parent | c8ea9d1f13096cd7f51e5972915a61ca65b56ac3 (diff) | |
download | samba-41760c18bdab20d526d32568531bdf7c88272879.tar.gz samba-41760c18bdab20d526d32568531bdf7c88272879.tar.bz2 samba-41760c18bdab20d526d32568531bdf7c88272879.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema
Diffstat (limited to 'source3/lib/dbwrap_rbt.c')
-rw-r--r-- | source3/lib/dbwrap_rbt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/dbwrap_rbt.c b/source3/lib/dbwrap_rbt.c index 6e09627223..cf4faa25b9 100644 --- a/source3/lib/dbwrap_rbt.c +++ b/source3/lib/dbwrap_rbt.c @@ -131,12 +131,12 @@ static NTSTATUS db_rbt_store(struct db_record *rec, TDB_DATA data, int flag) */ } - node = (struct db_rbt_node *)SMB_MALLOC( + node = (struct db_rbt_node *)talloc_size(rec_priv->db_ctx, offsetof(struct db_rbt_node, data) + rec->key.dsize + data.dsize); if (node == NULL) { - SAFE_FREE(rec_priv->node); + TALLOC_FREE(rec_priv->node); return NT_STATUS_NO_MEMORY; } @@ -148,7 +148,7 @@ static NTSTATUS db_rbt_store(struct db_record *rec, TDB_DATA data, int flag) db_rbt_parse_node(node, &this_key, &this_val); memcpy(this_key.dptr, rec->key.dptr, node->keysize); - SAFE_FREE(rec_priv->node); + TALLOC_FREE(rec_priv->node); memcpy(this_val.dptr, data.dptr, node->valuesize); @@ -194,7 +194,7 @@ static NTSTATUS db_rbt_delete(struct db_record *rec) } rb_erase(&rec_priv->node->rb_node, &rec_priv->db_ctx->tree); - SAFE_FREE(rec_priv->node); + TALLOC_FREE(rec_priv->node); return NT_STATUS_OK; } |