summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-11-25 10:17:34 +0100
committerStefan Metzmacher <metze@samba.org>2015-11-27 10:10:18 +0100
commitf3d1fc1d06822a951a2a3eeb5aa53748b9b5b299 (patch)
tree5120c27ce391ab9771307c12c9965a38b47e36f1
parent257ec9c6e28b1ddc32bd554ff8259f8a067dd44e (diff)
downloadsamba-f3d1fc1d06822a951a2a3eeb5aa53748b9b5b299.tar.gz
dbwrap_rbt: use talloc_zero_size() instead of a partial ZERO_STRUCT()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11375 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11394 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
-rw-r--r--lib/dbwrap/dbwrap_rbt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/dbwrap/dbwrap_rbt.c b/lib/dbwrap/dbwrap_rbt.c
index 0764a2c723d..37d9649a759 100644
--- a/lib/dbwrap/dbwrap_rbt.c
+++ b/lib/dbwrap/dbwrap_rbt.c
@@ -153,7 +153,7 @@ static NTSTATUS db_rbt_store(struct db_record *rec, TDB_DATA data, int flag)
return NT_STATUS_INSUFFICIENT_RESOURCES;
}
- node = talloc_size(db_ctx, reclen);
+ node = talloc_zero_size(db_ctx, reclen);
if (node == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -172,8 +172,6 @@ static NTSTATUS db_rbt_store(struct db_record *rec, TDB_DATA data, int flag)
*/
}
- ZERO_STRUCT(node->rb_node);
-
node->keysize = rec->key.dsize;
node->valuesize = data.dsize;