tldap: avoid more use after free errors
authorRalph Boehme <slow@samba.org>
Tue, 5 Feb 2019 13:08:56 +0000 (14:08 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 21 Feb 2019 11:31:46 +0000 (12:31 +0100)
See the previous commit for an explanation. :)

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Feb  6 10:19:12 CET 2019 on sn-devel-144

(cherry picked from commit bf91ee0a9727cc392583fe84ad069204be758515)

source3/lib/tldap_util.c

index 89f812b97e07f04b62fd9416582bfde4b96b8746..accdbe41d964f40f079e8e816048f67072121155 100644 (file)
@@ -459,7 +459,6 @@ static void tldap_fetch_rootdse_done(struct tevent_req *subreq)
 
        rc = tldap_search_recv(subreq, state, &msg);
        if (tevent_req_ldap_error(req, rc)) {
-               TALLOC_FREE(subreq);
                return;
        }
 
@@ -741,7 +740,6 @@ static void tldap_search_paged_done(struct tevent_req *subreq)
 
        rc = tldap_search_recv(subreq, state, &state->result);
        if (tevent_req_ldap_error(req, rc)) {
-               TALLOC_FREE(subreq);
                return;
        }