Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
orbea -
OpenLDAP
Commits
41595ab9
Commit
41595ab9
authored
Aug 20, 1999
by
Kurt Zeilenga
Browse files
Import plugs for memory leaks from devel
parent
a849473e
Changes
1
Hide whitespace changes
Inline
Side-by-side
clients/tools/ldapmodify.c
View file @
41595ab9
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment