dsdb: Be careful to avoid use of the expensive talloc_is_parent()
authorAndrew Bartlett <abartlet@samba.org>
Tue, 24 Aug 2021 21:41:11 +0000 (09:41 +1200)
committerJeremy Allison <jra@samba.org>
Sun, 5 Sep 2021 02:28:29 +0000 (02:28 +0000)
commit8affe4a1e625104de4ca024fdc3e9cd96498aff3
treee0eb78e7a5d43a2cb4d4fe7afe48dd78aa76b149
parent75a5ed66731e947fa16af81aab7649d1fddec45f
dsdb: Be careful to avoid use of the expensive talloc_is_parent()

The wrong talloc API was selected while addressing a memory leak.

commit ee2fe56ba0ef6626b634376e8dc2185aa89f8c99
Author: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Date:   Tue Nov 27 11:07:44 2018 +1300

    drepl: memory leak fix

    Fixes a memory leak where schema reference attached to ldb
    instance is lost before it can be freed.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
    Autobuild-User(master): Garming Sam <garming@samba.org>
    Autobuild-Date(master): Wed Jul 17 06:17:10 UTC 2019 on sn-devel-184

By using talloc_get_parent() walking the entire talloc tree is
avoided.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/dsdb/schema/schema_set.c