tldap: Only free() ld->pending if "req" is part of it
authorVolker Lendecke <vl@samba.org>
Tue, 11 Aug 2020 14:16:12 +0000 (16:16 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 31 Aug 2020 09:26:35 +0000 (09:26 +0000)
commit2eef42e690829cfbccc27368b1da0614f03da75e
tree8412b80601f4ce5d103811a7bc7647bde14c3351
parenta8dfc1ad59f662ff1f01192c91a8a7d169e0938b
tldap: Only free() ld->pending if "req" is part of it

Best reviewed with "git show -U10". We need to check that "req" is
actually the last request that is being freed before freeing the whole
array.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14465

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit b85dbc9ccf80d8c19aff33c1da83954e5d6a37ef)
source3/lib/tldap.c