]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
srv_cred itself is NULL
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 17 Nov 2022 23:54:51 +0000 (17:54 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 17 Nov 2022 23:54:51 +0000 (17:54 -0600)
src/lib/ldap/sasl.c

index 16df5afadd411a861a382feefe4a3c337c69762e..336046b345a55acfa0c5e494abc6e8bad808b542 100644 (file)
@@ -177,9 +177,11 @@ static void _ldap_sasl_bind_io_read(fr_event_list_t *el, int fd, UNUSED int flag
                 *      Observed as NULL when doing EXTERNAL
                 *      authentication.
                 */
-               if (srv_cred->bv_val) DEBUG3("SASL response  : %pV",
-                                            fr_box_strvalue_len(srv_cred->bv_val, srv_cred->bv_len));
-               ber_bvfree(srv_cred);
+               if (srv_cred) {
+                       DEBUG3("SASL response  : %pV",
+                              fr_box_strvalue_len(srv_cred->bv_val, srv_cred->bv_len));
+                       ber_bvfree(srv_cred);
+               }
 
                /*
                 *      If we need to continue, wait until the