if ( syncstate == LDAP_SYNC_PRESENT || syncstate == LDAP_SYNC_DELETE ) {
/* NOTE: this could be done even before decoding the DN,
* although encoding errors wouldn't be detected */
- return LDAP_SUCCESS;
+ rc = LDAP_SUCCESS;
+ goto done;
}
if ( entry == NULL ) {
e = NULL;
}
}
- *entry = e;
+ if ( entry )
+ *entry = e;
return rc;
}