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
62504d7e
Commit
62504d7e
authored
17 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
add anlist_free
parent
20829356
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
servers/slapd/ad.c
+20
-4
20 additions, 4 deletions
servers/slapd/ad.c
servers/slapd/proto-slap.h
+3
-0
3 additions, 0 deletions
servers/slapd/proto-slap.h
with
23 additions
and
4 deletions
servers/slapd/ad.c
+
20
−
4
View file @
62504d7e
...
...
@@ -963,10 +963,8 @@ str2anlist( AttributeName *an, char *in, const char *brkstr )
return
(
an
);
reterr:
for
(
i
=
0
;
an
[
i
].
an_name
.
bv_val
;
i
++
)
{
free
(
an
[
i
].
an_name
.
bv_val
);
}
free
(
an
);
anlist_free
(
an
,
1
,
NULL
);
/*
* overwrites input string
* on error!
...
...
@@ -976,6 +974,24 @@ reterr:
return
NULL
;
}
void
anlist_free
(
AttributeName
*
an
,
int
freename
,
void
*
ctx
)
{
if
(
an
==
NULL
)
{
return
;
}
if
(
freename
)
{
int
i
;
for
(
i
=
0
;
an
[
i
].
an_name
.
bv_val
;
i
++
)
{
ber_memfree_x
(
an
[
i
].
an_name
.
bv_val
,
ctx
);
}
}
ber_memfree_x
(
an
,
ctx
);
}
char
**
anlist2charray_x
(
AttributeName
*
an
,
int
dup
,
void
*
ctx
)
{
char
**
attrs
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/proto-slap.h
+
3
−
0
View file @
62504d7e
...
...
@@ -168,6 +168,9 @@ LDAP_SLAPD_F (AttributeDescription *) ad_find_tags LDAP_P((
LDAP_SLAPD_F
(
AttributeName
*
)
str2anlist
LDAP_P
((
AttributeName
*
an
,
char
*
str
,
const
char
*
brkstr
));
LDAP_SLAPD_F
(
void
)
anlist_free
LDAP_P
((
AttributeName
*
an
,
int
freename
,
void
*
ctx
));
LDAP_SLAPD_F
(
char
**
)
anlist2charray_x
LDAP_P
((
AttributeName
*
an
,
int
dup
,
void
*
ctx
));
LDAP_SLAPD_F
(
char
**
)
anlist2charray
LDAP_P
((
AttributeName
*
an
,
int
dup
));
...
...
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