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
Joe Martin
OpenLDAP
Commits
9693c800
Commit
9693c800
authored
Apr 07, 2006
by
Howard Chu
Browse files
Free/decrement SSL_CTX refcount when (re)setting it
parent
301394c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/tls.c
View file @
9693c800
...
...
@@ -1347,6 +1347,8 @@ ldap_pvt_tls_set_option( LDAP *ld, int option, void *arg )
return
-
1
;
case
LDAP_OPT_X_TLS_CTX
:
if
(
lo
->
ldo_tls_ctx
)
SSL_CTX_free
(
lo
->
ldo_tls_ctx
);
lo
->
ldo_tls_ctx
=
arg
;
return
0
;
case
LDAP_OPT_X_TLS_CONNECT_CB
:
...
...
@@ -1413,6 +1415,8 @@ ldap_pvt_tls_set_option( LDAP *ld, int option, void *arg )
case
LDAP_OPT_X_TLS_NEWCTX
:
if
(
!
arg
)
return
-
1
;
if
(
lo
->
ldo_tls_ctx
)
SSL_CTX_free
(
lo
->
ldo_tls_ctx
);
lo
->
ldo_tls_ctx
=
NULL
;
return
ldap_int_tls_init_ctx
(
lo
,
*
(
int
*
)
arg
);
default:
...
...
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