]> git.ipfire.org Git - thirdparty/samba.git/commit
ldb:kv_index: help static analysers to not worry (CID 1615192)
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 30 Jul 2024 21:20:50 +0000 (09:20 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Wed, 28 Aug 2024 04:24:39 +0000 (04:24 +0000)
commite2a74963fb89f5409c236a0fbe4cd070e1a75a43
tree12d93d33d28bb35c8c8e8455a41388c3499ddf59
parent7dac035896b368bf3a86acf58260eef39d195d19
ldb:kv_index: help static analysers to not worry (CID 1615192)

The point of this realloc is that we are not using this array, but
keeping it around to remain a node the talloc tree. We'd prefer to
reduce it to nothing.

Coverity rightly spotted that it was reallocing an array of `struct
ldb_val` to an array of `struct ldb_val *`, which has a different size
and all. But it doesn't matter in this case, because we will never use
it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15590

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <josutton@catalyst.net.nz>
lib/ldb/ldb_key_value/ldb_kv_index.c