mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
ldb_tdb: Reduce memory consumption in list_intersect()
We will never have more results than is in either list or list2. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
parent
97b026a73f
commit
3c6977b17c
@ -885,7 +885,8 @@ static bool list_intersect(struct ldb_context *ldb,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
list3->dn = talloc_array(list3, struct ldb_val, list->count);
|
list3->dn = talloc_array(list3, struct ldb_val,
|
||||||
|
MIN(list->count, list2->count));
|
||||||
if (!list3->dn) {
|
if (!list3->dn) {
|
||||||
talloc_free(list3);
|
talloc_free(list3);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user