]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/cyrus.c
ITS#897 Internal connection that is closed on one end and about to
[openldap] / libraries / libldap / cyrus.c
index 05691e9de753da37bbbf325fa0a0e285bae2b2c1..3b35dd2fbedeead8de5fa82c2690054afde121d7 100644 (file)
@@ -662,9 +662,15 @@ ldap_int_sasl_external(
        ber_len_t ssf )
 {
        int sc;
-       sasl_conn_t *ctx = ld->ld_defconn->lconn_sasl_ctx;
+       sasl_conn_t *ctx;
        sasl_external_properties_t extprops;
-    
+
+       if( ld->ld_defconn == NULL ) {
+               return LDAP_LOCAL_ERROR;
+       }
+
+       ctx = ld->ld_defconn->lconn_sasl_ctx;
+
        if ( ctx == NULL ) {
                return LDAP_LOCAL_ERROR;
        }