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
320d6742
Commit
320d6742
authored
23 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
Added atexit handler to free global_opts->ldo_defludp.
parent
ff682be2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/libldap/init.c
+13
-2
13 additions, 2 deletions
libraries/libldap/init.c
with
13 additions
and
2 deletions
libraries/libldap/init.c
+
13
−
2
View file @
320d6742
...
...
@@ -364,6 +364,17 @@ static void openldap_ldap_init_w_env(
}
}
static
void
ldap_int_destroy_global_options
()
{
struct
ldapoptions
*
gopts
=
LDAP_INT_GLOBAL_OPT
();
if
(
gopts
->
ldo_defludp
)
{
ldap_free_urllist
(
gopts
->
ldo_defludp
);
gopts
->
ldo_defludp
=
NULL
;
}
}
/*
* Initialize the global options structure with default values.
*/
...
...
@@ -382,11 +393,11 @@ void ldap_int_initialize_global_options( struct ldapoptions *gopts, int *dbglvl
gopts
->
ldo_tm_api
=
(
struct
timeval
*
)
NULL
;
gopts
->
ldo_tm_net
=
(
struct
timeval
*
)
NULL
;
/* ldo_defludp is leaked, we should have an at_exit() handler
* to free this and whatever else needs to cleaned up.
/* ldo_defludp wll be freed by the atexit() handler
*/
ldap_url_parselist
(
&
gopts
->
ldo_defludp
,
"ldap://localhost/"
);
gopts
->
ldo_defport
=
LDAP_PORT
;
atexit
(
ldap_int_destroy_global_options
);
gopts
->
ldo_refhoplimit
=
LDAP_DEFAULT_REFHOPLIMIT
;
gopts
->
ldo_rebind_proc
=
NULL
;
...
...
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