Makes an allocated copy of an LDAPControl.
#include "slapi-plugin.h" LDAPControl * slapi_dup_control( LDAPControl const *ctrl );
This function takes the following parameter:
Pointer to an LDAPControl structure whose contents are to be duplicated.
This function returns a pointer to an allocated LDAPControl structure if successful, or NULL if an error occurs.
This function duplicates the contents of an LDAPControl structure. All fields within the LDAPControl are copied to a new, allocated structure, and a pointer to the new structure is returned.
The structure that is returned should be freed by calling ldap_control_free(3LDAP) , an LDAP API function.
ldap_control_free(3LDAP)