mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
We've finished with the old node once we've copied the
keyval. Jeremy. (This used to be commit 39f3efbcc5fbdff1db1b12e5fc7368968f240993)
This commit is contained in:
parent
537c4cf9cd
commit
c99dc69a45
@ -121,6 +121,10 @@ static NTSTATUS db_rbt_store(struct db_record *rec, TDB_DATA data, int flag)
|
||||
memcpy(this_key.dptr, rec->key.dptr, node->keysize);
|
||||
memcpy(this_val.dptr, data.dptr, node->valuesize);
|
||||
|
||||
if (del_old_keyval) {
|
||||
SAFE_FREE(rec_priv->node);
|
||||
}
|
||||
|
||||
parent = NULL;
|
||||
p = &rec_priv->db_ctx->tree.rb_node;
|
||||
|
||||
@ -157,10 +161,6 @@ static NTSTATUS db_rbt_store(struct db_record *rec, TDB_DATA data, int flag)
|
||||
rb_link_node(&node->rb_node, parent, p);
|
||||
rb_insert_color(&node->rb_node, &rec_priv->db_ctx->tree);
|
||||
|
||||
if (del_old_keyval) {
|
||||
SAFE_FREE(rec_priv->node);
|
||||
}
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user