Up to OpenLDAP 2.3, additional info and matched DN were always stored and passed as strings; in case they were empty, an empty string, i.e. a string containing just a '\0', was stored and returned.
Since OpenLDAP 2.4, empty strings for those fields are treated as NULL. This is essentially an optimization, since it avoids useless malloc/free of empty strings, and handling of NULL pointers is delegated to clients.
OpenLDAP 2.3 already provides this feature if compiled with -DLDAP_NULL_IS_NULL set.
Client developers are encouraged to experiment with this setting, to track down cases where NULL values are treated incorrectly. This parameter affects values accessed via ldap_parse_result(3) when either matcheddnp or errmsgp are not NULL, or via ldap_get_option(3) when used to collect LDAP_OPT_MATCHED_DN or LDAP_OPT_ERROR_STRING are requested.