From: Nick Porter Date: Tue, 23 May 2023 07:18:06 +0000 (+0100) Subject: Only call query->parser if there are valid results. Fix for CID #1529242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be1b239ee489cc9dfb583de79c61f73414e09136;p=thirdparty%2Ffreeradius-server.git Only call query->parser if there are valid results. Fix for CID #1529242 --- diff --git a/src/lib/ldap/connection.c b/src/lib/ldap/connection.c index 154b68b4f7c..ddf027e570a 100644 --- a/src/lib/ldap/connection.c +++ b/src/lib/ldap/connection.c @@ -925,7 +925,8 @@ static void ldap_trunk_request_demux(fr_event_list_t *el, fr_trunk_connection_t /* * If we have a specific parser to handle the result, call it */ - if (query->parser) query->parser(ldap_conn->handle, query, result, query->treq->rctx); + if (query->parser && (rcode == LDAP_PROC_SUCCESS)) query->parser(ldap_conn->handle, query, + result, query->treq->rctx); /* * Set the request as runnable