lib/ldb: Avoid allocation and memcpy() for every wildcard match candidate
authorAndrew Bartlett <abartlet@samba.org>
Mon, 13 Mar 2023 01:25:56 +0000 (14:25 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 14 Mar 2023 06:16:30 +0000 (06:16 +0000)
commitcad96f59a08192df927fb1df4e9787c7f70991a2
treeca6170d40cc00d5c7f65d1969655b07656a1265f
parent4fa0242b9d34decd8dbd813be40655a593df3db9
lib/ldb: Avoid allocation and memcpy() for every wildcard match candidate

The value can be quite large, the allocation will take much
longer than the actual match and is repeated per candidate
record.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
lib/ldb/common/ldb_match.c