]> git.sur5r.net Git - openldap/blobdiff - contrib/ldapc++/src/LDAPEntry.cpp
initial support for SASL
[openldap] / contrib / ldapc++ / src / LDAPEntry.cpp
index 3af69cc593867b0d97dfbb6a0e2f1069ed1a7382..a4dbb79a3b64b23ad6bd02764cea0e4c75918e6b 100644 (file)
@@ -7,6 +7,7 @@
 #include "debug.h"
 #include "LDAPEntry.h"
 
+#include "LDAPAsynConnection.h"
 #include "LDAPException.h"
 
 using namespace std;
@@ -30,7 +31,7 @@ LDAPEntry::LDAPEntry(const LDAPAsynConnection *ld, LDAPMessage *msg){
     DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPEntry::LDAPEntry()" << endl);
     char* tmp=ldap_get_dn(ld->getSessionHandle(),msg);
     m_dn=string(tmp);
-    free(tmp);
+    ldap_memfree(tmp);
     m_attrs = new LDAPAttributeList(ld, msg);
 }
 
@@ -56,7 +57,7 @@ void LDAPEntry::setAttributes(LDAPAttributeList *attrs){
     m_attrs=attrs;
 }
 
-const string LDAPEntry::getDN() const{
+const string& LDAPEntry::getDN() const{
     DEBUG(LDAP_DEBUG_TRACE,"LDAPEntry::getDN()" << endl);
     return m_dn;
 }