mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 09:39:45 -05:00
Fix ITS#2320, check for NULL re->re_replicas
This commit is contained in:
parent
13b63911a4
commit
9c701c8861
1 changed files with 1 additions and 1 deletions
|
|
@ -583,7 +583,7 @@ Re_write(
|
|||
goto bad;
|
||||
}
|
||||
} else { /* write multiple "replica:" lines */
|
||||
for ( i = 0; re->re_replicas[ i ].rh_hostname != NULL; i++ ) {
|
||||
for ( i = 0; re->re_replicas && re->re_replicas[ i ].rh_hostname != NULL; i++ ) {
|
||||
if ( fprintf( fp, "replica: %s:%d\n",
|
||||
re->re_replicas[ i ].rh_hostname,
|
||||
re->re_replicas[ i ].rh_port ) < 0 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue