X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=contrib%2Fldapc%2B%2B%2Fsrc%2FLDAPSearchRequest.cpp;h=28b5023554d9976293bb30145f65b1889972bd4c;hb=4d0d12db27b3b44cc36acc089b0e640320480fe7;hp=7b5b25e5399b7c6f2101a90003cee60518bab3dd;hpb=259b90aaa2d642475f793604606c8d249abc2138;p=openldap diff --git a/contrib/ldapc++/src/LDAPSearchRequest.cpp b/contrib/ldapc++/src/LDAPSearchRequest.cpp index 7b5b25e539..28b5023554 100644 --- a/contrib/ldapc++/src/LDAPSearchRequest.cpp +++ b/contrib/ldapc++/src/LDAPSearchRequest.cpp @@ -1,8 +1,11 @@ +// $OpenLDAP$ /* - * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. + * Copyright 2000-2012 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ +#include "config.h" +#include "ac/time.h" #include "debug.h" #include "LDAPSearchRequest.h" #include "LDAPException.h" @@ -11,6 +14,8 @@ #include "LDAPRequest.h" #include "LDAPUrl.h" +using namespace std; + LDAPSearchRequest::LDAPSearchRequest(const LDAPSearchRequest& req ) : LDAPRequest (req){ DEBUG(LDAP_DEBUG_CONSTRUCT, @@ -66,9 +71,9 @@ LDAPMessageQueue* LDAPSearchRequest::sendRequest(){ m_scope, m_filter.c_str(), tmpattrs, m_attrsOnly, tmpSrvCtrl, tmpClCtrl, tmptime, m_cons->getSizeLimit(), &msgID ); delete tmptime; - ldap_value_free(tmpattrs); - ldap_controls_free(tmpSrvCtrl); - ldap_controls_free(tmpClCtrl); + ber_memvfree((void**)tmpattrs); + LDAPControlSet::freeLDAPControlArray(tmpSrvCtrl); + LDAPControlSet::freeLDAPControlArray(tmpClCtrl); if (err != LDAP_SUCCESS){ throw LDAPException(err);