Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
f13d97e0
Commit
f13d97e0
authored
Feb 10, 2005
by
Sang Seok Lim
Browse files
Fix memory leak in a component encoder
parent
ebd026cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
contrib/slapd-modules/comp_match/init.c
View file @
f13d97e0
...
...
@@ -760,11 +760,14 @@ comp_component_encoder ( void* mem_op, ComponentSyntaxInfo* csi , struct berval*
* use nibble memory in it
*/
free
(
bv
.
bv_val
);
GenBufFreeBuf
(
b
);
BufFreeBuf
(
buf
);
return
LDAP_SUCCESS
;
}
rc
=
csi
->
csi_comp_desc
->
cd_gser_encoder
(
b
,
csi
);
if
(
rc
<
0
)
{
GenBufFreeBuf
(
b
);
BufFreeBuf
(
buf
);
return
rc
;
}
...
...
@@ -780,6 +783,7 @@ comp_component_encoder ( void* mem_op, ComponentSyntaxInfo* csi , struct berval*
BufCopy
(
nval
->
bv_val
,
b
,
size
);
}
ExpBufFreeBuf
(
buf
);
GenBufFreeBuf
(
b
);
return
LDAP_SUCCESS
;
}
...
...
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