Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Jaak Ristioja
OpenLDAP
Commits
c8634253
Commit
c8634253
authored
20 years ago
by
Sang Seok Lim
Browse files
Options
Downloads
Patches
Plain Diff
fix snacc buffer memory leak
parent
ccd3acc9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/slapd-modules/comp_match/Makefile
+1
-1
1 addition, 1 deletion
contrib/slapd-modules/comp_match/Makefile
contrib/slapd-modules/comp_match/init.c
+5
-13
5 additions, 13 deletions
contrib/slapd-modules/comp_match/init.c
with
6 additions
and
14 deletions
contrib/slapd-modules/comp_match/Makefile
+
1
−
1
View file @
c8634253
...
...
@@ -17,7 +17,7 @@
topbuilddir
=
../../../../build
topsrcdir
=
../../..
snaccdir
=
/
usr/local
/snacc
snaccdir
=
/
home/slim
/snacc
LIBTOOL
=
$(
topbuilddir
)
/libtool
OPT
=
-g
-O2
-DLDAP_COMPONENT
...
...
This diff is collapsed.
Click to expand it.
contrib/slapd-modules/comp_match/init.c
+
5
−
13
View file @
c8634253
...
...
@@ -201,8 +201,8 @@ comp_convert_attr_to_comp LDAP_P (( Attribute* a, Syntax *syn, struct berval* bv
int
mode
,
bytesDecoded
,
size
,
rc
;
void
*
component
;
char
*
oid
=
a
->
a_desc
->
ad_type
->
sat_atype
.
at_oid
;
GenBuf
*
b
;
ExpBuf
*
buf
;
GenBuf
*
b
=
NULL
;
ExpBuf
*
buf
=
NULL
;
OidDecoderMapping
*
odm
;
/* look for the decoder registered for the given attribute */
...
...
@@ -233,6 +233,7 @@ comp_convert_attr_to_comp LDAP_P (( Attribute* a, Syntax *syn, struct berval* bv
}
ExpBufFreeBuf
(
buf
);
GenBufFreeBuf
(
b
);
if
(
rc
==
-
1
)
{
ShutdownNibbleMemLocal
(
a
->
a_comp_data
->
cd_mem_op
);
free
(
a
->
a_comp_data
);
...
...
@@ -273,6 +274,7 @@ comp_convert_assert_to_comp (
rc
=
(
*
decoder
)(
mem_op
,
genBuf
,
csi
,
len
,
mode
);
ExpBufFreeBuf
(
buf
);
GenBufFreeBuf
(
genBuf
);
}
int
intToAscii
(
int
value
,
char
*
buf
)
{
...
...
@@ -662,20 +664,10 @@ comp_test_components( void* attr_nm, void* assert_nm, ComponentSyntaxInfo* csi_a
mode
=
DEC_ALLOC_MODE_2
;
/* Try to decode with BER/DER decoder */
#if 0
rc =BDecComponentTop( odm->BER_Decode, attr_nm, b, 0,0, &contained_comp,&bytesDecoded, mode );
#endif
rc
=
odm
->
BER_Decode
(
attr_nm
,
b
,
(
ComponentSyntaxInfo
*
)
&
contained_comp
,
&
bytesDecoded
,
mode
);
#if 0
if ( rc != LDAP_SUCCESS ) {
/* If fails with BER/DER decoder, try with GSER */
bytesDecoded = 0;
BufResetInReadMode( b );
rc = odm->GSER_decoder( attr_nm, b, contained_comp, &bytesDecoded, mode);
}
#endif
ExpBufFreeBuf
(
buf
);
GenBufFreeBuf
(
b
);
if
(
rc
!=
LDAP_SUCCESS
)
return
LDAP_PROTOCOL_ERROR
;
...
...
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