ldb: removing alloc from unpack_data
authorAaron Haslett <aaronhaslett@catalyst.net.nz>
Thu, 9 May 2019 00:12:14 +0000 (12:12 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 15 May 2019 04:03:36 +0000 (04:03 +0000)
commitea7fd52a78d90f54c8b0f2583c72827971ddea6a
treeffff39afe6efffdcfef633efc18187e79f75c4f0
parent73bf2949e85d94103d85e54b7963f79ed4f4a961
ldb: removing alloc from unpack_data

Making unpack flag LDB_UNPACK_DATA_FLAG_NO_DATA_ALLOC required
behaviour, since allocating data during unpack is slow and unnecessary
in all current usages. In any future unpack usage, if editing of
returned memory is required, some function that duplicates the message
should be used, such as one of the filter_attrs functions, or msg_copy.

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/ldb/common/ldb_pack.c
lib/ldb/include/ldb_module.h
lib/ldb/ldb_key_value/ldb_kv.c
lib/ldb/ldb_key_value/ldb_kv_cache.c
lib/ldb/ldb_key_value/ldb_kv_index.c
lib/ldb/ldb_key_value/ldb_kv_search.c
source4/torture/ldb/ldb.c