tldap: Always remove ourselves from ld->pending at cleanup time
authorVolker Lendecke <vl@samba.org>
Mon, 17 Aug 2020 19:59:48 +0000 (21:59 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 3 Sep 2020 13:34:10 +0000 (13:34 +0000)
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 14f6d1996ec38620b1c05a3b6c0e26dd21801fac)

source3/lib/tldap.c

index 9274db126c465205d2da1f56458249212f5248c3..09f8446677d7f5cb086c8e4a6c6a70e235d3cbae 100644 (file)
@@ -529,14 +529,7 @@ static void tldap_msg_unset_pending(struct tevent_req *req)
 static void tldap_msg_cleanup(struct tevent_req *req,
                              enum tevent_req_state req_state)
 {
-       switch (req_state) {
-       case TEVENT_REQ_USER_ERROR:
-       case TEVENT_REQ_RECEIVED:
-               tldap_msg_unset_pending(req);
-               return;
-       default:
-               return;
-       }
+       tldap_msg_unset_pending(req);
 }
 
 static bool tldap_msg_set_pending(struct tevent_req *req)