diff options
author | Stefan Metzmacher <metze@samba.org> | 2015-11-25 10:17:34 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2015-11-27 10:10:18 +0100 |
commit | f3d1fc1d06822a951a2a3eeb5aa53748b9b5b299 (patch) | |
tree | 5120c27ce391ab9771307c12c9965a38b47e36f1 | |
parent | 257ec9c6e28b1ddc32bd554ff8259f8a067dd44e (diff) | |
download | samba-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.c | 4 |
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; |