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
c1b5068f
Commit
c1b5068f
authored
25 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Apply Hallvard's memory leak plugs...
parent
ccab3faa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clients/tools/ldapmodify.c
+11
-5
11 additions, 5 deletions
clients/tools/ldapmodify.c
with
11 additions
and
5 deletions
clients/tools/ldapmodify.c
+
11
−
5
View file @
c1b5068f
...
...
@@ -409,7 +409,7 @@ process_ldif_rec( char *rbuf, int count )
}
expect_ct
=
1
;
}
cont
in
u
e
;
/* skip all lines until we see "dn:" */
goto
end_l
ine
;
/* skip all lines until we see "dn:" */
}
if
(
expect_ct
)
{
...
...
@@ -419,6 +419,8 @@ process_ldif_rec( char *rbuf, int count )
"
\t
(LDAP host/port does not match replica: lines)
\n
"
,
prog
,
dn
);
free
(
dn
);
ber_memfree
(
type
);
ber_memfree
(
value
);
return
(
0
);
}
...
...
@@ -441,7 +443,7 @@ process_ldif_rec( char *rbuf, int count )
prog
,
T_CHANGETYPESTR
,
value
,
linenum
,
dn
);
rc
=
LDAP_PARAM_ERROR
;
}
cont
in
u
e
;
goto
end_l
ine
;
}
else
if
(
new
)
{
/* missing changetype => add */
new_entry
=
1
;
modop
=
LDAP_MOD_ADD
;
...
...
@@ -455,14 +457,14 @@ process_ldif_rec( char *rbuf, int count )
expect_sep
=
1
;
if
(
strcasecmp
(
type
,
T_MODOPADDSTR
)
==
0
)
{
modop
=
LDAP_MOD_ADD
;
cont
in
u
e
;
goto
end_l
ine
;
}
else
if
(
strcasecmp
(
type
,
T_MODOPREPLACESTR
)
==
0
)
{
modop
=
LDAP_MOD_REPLACE
;
cont
in
u
e
;
goto
end_l
ine
;
}
else
if
(
strcasecmp
(
type
,
T_MODOPDELETESTR
)
==
0
)
{
modop
=
LDAP_MOD_DELETE
;
addmodifyop
(
&
pmods
,
modop
,
value
,
NULL
,
0
);
cont
in
u
e
;
goto
end_l
ine
;
}
else
{
/* no modify op: use default */
modop
=
replace
?
LDAP_MOD_REPLACE
:
LDAP_MOD_ADD
;
}
...
...
@@ -512,6 +514,10 @@ process_ldif_rec( char *rbuf, int count )
}
else
{
addmodifyop
(
&
pmods
,
modop
,
type
,
value
,
vlen
);
}
end_line:
ber_memfree
(
type
);
ber_memfree
(
value
);
}
if
(
linenum
==
0
)
{
...
...
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