These routines may dynamically allocate memory. The caller is
 responsible for freeing such memory using supplied deallocation
 routines. Return values are contained in <ldap.h>.
+.LP
+Note that \fIres\fR parameter of
+.B ldap_search_ext_s()
+and
+.B ldap_search_s()
+should be freed with
+.B ldap_msgfree()
+regardless of return value of these functions.
 .SH DEPRECATED INTERFACES
 The 
 .B ldap_search()
 
        int rc;
        int     msgid;
 
+    *res = NULL;
+
        rc = ldap_pvt_search( ld, base, scope, filter, attrs, attrsonly,
                sctrls, cctrls, timeout, sizelimit, deref, &msgid );
 
 {
        int     msgid;
 
+    *res = NULL;
+
        if ( (msgid = ldap_search( ld, base, scope, filter, attrs, attrsonly ))
            == -1 )
                return( ld->ld_errno );
 {
        int     msgid;
 
+    *res = NULL;
+
        if ( (msgid = ldap_search( ld, base, scope, filter, attrs, attrsonly ))
            == -1 )
                return( ld->ld_errno );