Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
45481f72
Commit
45481f72
authored
Nov 13, 2006
by
Howard Chu
Browse files
ITS#4746 additional leaks
parent
47016d45
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/syncrepl.c
View file @
45481f72
...
...
@@ -1265,7 +1265,7 @@ syncrepl_message_to_op(
struct
berval
rdn
=
BER_BVNULL
,
sup
=
BER_BVNULL
,
prdn
=
BER_BVNULL
,
nrdn
=
BER_BVNULL
,
psup
=
BER_BVNULL
,
nsup
=
BER_BVNULL
;
int
rc
,
deleteOldRdn
=
0
;
int
rc
,
deleteOldRdn
=
0
,
freeReqDn
=
0
;
if
(
ldap_msgtype
(
msg
)
!=
LDAP_RES_SEARCH_ENTRY
)
{
Debug
(
LDAP_DEBUG_ANY
,
...
...
@@ -1300,6 +1300,7 @@ syncrepl_message_to_op(
ber_dupbv
(
&
op
->
o_req_ndn
,
&
ndn
);
slap_sl_free
(
ndn
.
bv_val
,
op
->
o_tmpmemctx
);
slap_sl_free
(
dn
.
bv_val
,
op
->
o_tmpmemctx
);
freeReqDn
=
1
;
}
else
if
(
!
ber_bvstrcasecmp
(
&
bv
,
&
ls
->
ls_req
))
{
int
i
=
verb_to_mask
(
bvals
[
0
].
bv_val
,
modops
);
if
(
i
<
0
)
{
...
...
@@ -1358,6 +1359,7 @@ syncrepl_message_to_op(
op
->
ora_e
=
(
Entry
*
)
ch_calloc
(
1
,
sizeof
(
Entry
)
);
op
->
ora_e
->
e_name
=
op
->
o_req_dn
;
op
->
ora_e
->
e_nname
=
op
->
o_req_ndn
;
freeReqDn
=
0
;
rc
=
slap_mods2entry
(
modlist
,
&
op
->
ora_e
,
1
,
0
,
&
text
,
txtbuf
,
textlen
);
if
(
rc
!=
LDAP_SUCCESS
)
{
Debug
(
LDAP_DEBUG_ANY
,
"syncrepl_message_to_op: mods2entry (%s)
\n
"
,
...
...
@@ -1424,6 +1426,10 @@ done:
if
(
!
BER_BVISNULL
(
&
prdn
))
ch_free
(
prdn
.
bv_val
);
}
if
(
freeReqDn
)
{
ch_free
(
op
->
o_req_ndn
.
bv_val
);
ch_free
(
op
->
o_req_dn
.
bv_val
);
}
ber_free
(
ber
,
0
);
return
rc
;
}
...
...
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