Commit 0b78166a authored by Howard Chu's avatar Howard Chu
Browse files

ITS#9157: check for NULL ld

parent 164c15d7
Pipeline #4346 passed with stage
in 37 minutes and 34 seconds
......@@ -989,7 +989,7 @@ ldap_pvt_tls_set_option( LDAP *ld, int option, void *arg )
lo->ldo_tls_ctx = NULL;
errmsg[0] = 0;
rc = ldap_int_tls_init_ctx( lo, *(int *)arg, errmsg );
if ( rc && errmsg[0] ) {
if ( rc && errmsg[0] && ld ) {
if ( ld->ld_error )
LDAP_FREE( ld->ld_error );
ld->ld_error = LDAP_STRDUP( errmsg );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment