X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=contrib%2Fldapc%2B%2B%2Fsrc%2FLDAPControlSet.cpp;h=8a47d65b6d4ddaea47ed50a831c6710e99b528a9;hb=a75e57d15ae5024dfb76fefc46b113951969e8f3;hp=004c69eae98e70aa24359ff34851c79b195367b7;hpb=2941993d8fe5ff58eb0ee2abae97c7a5524fac95;p=openldap diff --git a/contrib/ldapc++/src/LDAPControlSet.cpp b/contrib/ldapc++/src/LDAPControlSet.cpp index 004c69eae9..8a47d65b6d 100644 --- a/contrib/ldapc++/src/LDAPControlSet.cpp +++ b/contrib/ldapc++/src/LDAPControlSet.cpp @@ -1,11 +1,14 @@ +// $OpenLDAP$ /* - * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. + * Copyright 2000-2013 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ #include "debug.h" #include "LDAPControlSet.h" +using namespace std; + LDAPControlSet::LDAPControlSet(){ } @@ -70,3 +73,12 @@ LDAPControl** LDAPControlSet::toLDAPControlArray() const{ } } +void LDAPControlSet::freeLDAPControlArray(LDAPControl **ctrl){ + DEBUG(LDAP_DEBUG_TRACE, "LDAPControlSet::freeLDAPControlArray()" << endl); + if( ctrl ){ + for( LDAPControl **i = ctrl; *i != 0; ++i ){ + LDAPCtrl::freeLDAPControlStruct(*i); + } + } + delete[] ctrl; +}