Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
ed70735b
Commit
ed70735b
authored
17 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
- Plugged memory leak default constructor
- Fixed copy-constructor
parent
6b242375
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/ldapc++/src/LDAPEntry.cpp
+12
-2
12 additions, 2 deletions
contrib/ldapc++/src/LDAPEntry.cpp
contrib/ldapc++/src/LDAPEntry.h
+7
-2
7 additions, 2 deletions
contrib/ldapc++/src/LDAPEntry.h
with
19 additions
and
4 deletions
contrib/ldapc++/src/LDAPEntry.cpp
+
12
−
2
View file @
ed70735b
...
...
@@ -22,8 +22,11 @@ LDAPEntry::LDAPEntry(const LDAPEntry& entry){
LDAPEntry
::
LDAPEntry
(
const
string
&
dn
,
const
LDAPAttributeList
*
attrs
){
DEBUG
(
LDAP_DEBUG_CONSTRUCT
,
"LDAPEntry::LDAPEntry()"
<<
endl
);
DEBUG
(
LDAP_DEBUG_CONSTRUCT
|
LDAP_DEBUG_PARAMETER
,
" dn:"
<<
dn
<<
endl
<<
" attrs:"
<<
*
attrs
<<
endl
);
m_attrs
=
new
LDAPAttributeList
(
*
attrs
);
" dn:"
<<
dn
<<
endl
);
if
(
attrs
)
m_attrs
=
new
LDAPAttributeList
(
*
attrs
);
else
m_attrs
=
new
LDAPAttributeList
();
m_dn
=
dn
;
}
...
...
@@ -40,6 +43,13 @@ LDAPEntry::~LDAPEntry(){
delete
m_attrs
;
}
LDAPEntry
&
LDAPEntry
::
operator
=
(
const
LDAPEntry
&
from
){
m_dn
=
from
.
m_dn
;
delete
m_attrs
;
m_attrs
=
new
LDAPAttributeList
(
*
(
from
.
m_attrs
));
return
*
this
;
}
void
LDAPEntry
::
setDN
(
const
string
&
dn
){
DEBUG
(
LDAP_DEBUG_TRACE
,
"LDAPEntry::setDN()"
<<
endl
);
DEBUG
(
LDAP_DEBUG_TRACE
|
LDAP_DEBUG_PARAMETER
,
...
...
This diff is collapsed.
Click to expand it.
contrib/ldapc++/src/LDAPEntry.h
+
7
−
2
View file @
ed70735b
...
...
@@ -30,7 +30,7 @@ class LDAPEntry{
* @param attrs The attributes for the new entry.
*/
LDAPEntry
(
const
std
::
string
&
dn
=
std
::
string
(),
const
LDAPAttributeList
*
attrs
=
new
LDAPAttributeList
()
);
const
LDAPAttributeList
*
attrs
=
0
);
/**
* Used internally only.
...
...
@@ -44,7 +44,12 @@ class LDAPEntry{
* Destructor
*/
~
LDAPEntry
();
/**
* Assingment operator
*/
LDAPEntry
&
operator
=
(
const
LDAPEntry
&
from
);
/**
* Sets the DN-attribute.
* @param dn: The new DN for the entry.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment