Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
f83b55b2
Commit
f83b55b2
authored
Dec 02, 2004
by
Howard Chu
Browse files
Avoid segfault if backend_destroy is called before frontendDB is created
parent
3330aceb
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/backend.c
View file @
f83b55b2
...
@@ -445,15 +445,17 @@ int backend_destroy(void)
...
@@ -445,15 +445,17 @@ int backend_destroy(void)
/* destroy frontend database */
/* destroy frontend database */
bd
=
frontendDB
;
bd
=
frontendDB
;
if
(
bd
->
bd_info
->
bi_db_destroy
)
{
if
(
bd
)
{
bd
->
bd_info
->
bi_db_destroy
(
bd
);
if
(
bd
->
bd_info
->
bi_db_destroy
)
{
bd
->
bd_info
->
bi_db_destroy
(
bd
);
}
ber_bvarray_free
(
bd
->
be_suffix
);
ber_bvarray_free
(
bd
->
be_nsuffix
);
if
(
bd
->
be_rootdn
.
bv_val
)
free
(
bd
->
be_rootdn
.
bv_val
);
if
(
bd
->
be_rootndn
.
bv_val
)
free
(
bd
->
be_rootndn
.
bv_val
);
if
(
bd
->
be_rootpw
.
bv_val
)
free
(
bd
->
be_rootpw
.
bv_val
);
acl_destroy
(
bd
->
be_acl
,
frontendDB
->
be_acl
);
}
}
ber_bvarray_free
(
bd
->
be_suffix
);
ber_bvarray_free
(
bd
->
be_nsuffix
);
if
(
bd
->
be_rootdn
.
bv_val
)
free
(
bd
->
be_rootdn
.
bv_val
);
if
(
bd
->
be_rootndn
.
bv_val
)
free
(
bd
->
be_rootndn
.
bv_val
);
if
(
bd
->
be_rootpw
.
bv_val
)
free
(
bd
->
be_rootpw
.
bv_val
);
acl_destroy
(
bd
->
be_acl
,
frontendDB
->
be_acl
);
return
0
;
return
0
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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