Frees a BerElement structure allocated by the ber_alloc_t or the ber_init function.
#include <ldap.h> or <lber.h>
void ber_free (
BerElement *ber,
int fbuf);
(IN) Points to a BerElement to be freed.
(IN) Flag indicating if the internal buffer associated with the BerElement should also be freed.
1 frees the internal buffer, 0 does not free it.
BerElements allocated by the library and returned to the application should be freed.
Note that when ldap_first_attribute returns a BerElement, it should be freed with ber_free(ber, 0). The internal buffer should not be freed since it points to the original searchResults.
If the ber parameter is NULL, the ber_free function does nothing.