]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Deal with edge case in LDAP cancellations
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 26 Jul 2022 15:50:38 +0000 (23:50 +0800)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 26 Jul 2022 15:50:49 +0000 (23:50 +0800)
src/lib/ldap/base.c

index 9028c5ab6b2e512463aa6aca976ed65907dfa102..bfa92b9862b9aa345d897b913c00c9015d297652 100644 (file)
@@ -612,6 +612,11 @@ static void ldap_trunk_query_cancel(UNUSED request_t *request, fr_state_signal_t
        fr_ldap_query_t *query = talloc_get_type_abort(uctx, fr_ldap_query_t);
 
        if (action != FR_SIGNAL_CANCEL) return;
+       /*
+        *      Query may have completed, but the request
+        *      not yet have been resumed.
+        */
+       if (!query->treq) return;
 
        fr_trunk_request_signal_cancel(query->treq);