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
a802f32f
Commit
a802f32f
authored
23 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
Use ber_memfree instead of free
parent
e60d22e3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/libavl/avl.c
+6
-5
6 additions, 5 deletions
libraries/libavl/avl.c
with
6 additions
and
5 deletions
libraries/libavl/avl.c
+
6
−
5
View file @
a802f32f
...
...
@@ -24,6 +24,7 @@
#ifdef CSRIMALLOC
#define ber_memalloc malloc
#define ber_memrealloc realloc
#define ber_memfree free
#else
#include
"lber.h"
#endif
...
...
@@ -377,13 +378,13 @@ ravl_delete( Avlnode **root, void* data, AVL_CMP fcmp, int *shorter )
if
(
(
*
root
)
->
avl_left
==
0
)
{
*
root
=
(
*
root
)
->
avl_right
;
*
shorter
=
1
;
free
(
(
char
*
)
savenode
);
ber_mem
free
(
(
char
*
)
savenode
);
return
(
savedata
);
/* no right child */
}
else
if
(
(
*
root
)
->
avl_right
==
0
)
{
*
root
=
(
*
root
)
->
avl_left
;
*
shorter
=
1
;
free
(
(
char
*
)
savenode
);
ber_mem
free
(
(
char
*
)
savenode
);
return
(
savedata
);
}
...
...
@@ -616,7 +617,7 @@ avl_free( Avlnode *root, AVL_FREE dfree )
if
(
dfree
)
(
*
dfree
)(
root
->
avl_data
);
free
(
root
);
ber_mem
free
(
root
);
return
(
nleft
+
nright
+
1
);
}
...
...
@@ -717,7 +718,7 @@ void*
avl_getfirst
(
Avlnode
*
root
)
{
if
(
avl_list
)
{
free
(
(
char
*
)
avl_list
);
ber_mem
free
(
(
char
*
)
avl_list
);
avl_list
=
(
void
*
*
)
0
;
}
avl_maxlist
=
0
;
...
...
@@ -738,7 +739,7 @@ avl_getnext( void )
return
(
0
);
if
(
avl_nextlist
==
avl_maxlist
)
{
free
(
(
void
*
)
avl_list
);
ber_mem
free
(
(
void
*
)
avl_list
);
avl_list
=
(
void
*
*
)
0
;
return
(
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