Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
c0d79992
Commit
c0d79992
authored
Jun 08, 2015
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3188 from thentenaar/clean-up-after-openssl
global: Ensure we free our SSL context.
parents
b6011e29
20f8edb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
src/global.c
+16
-0
No files found.
src/global.c
View file @
c0d79992
...
@@ -116,6 +116,20 @@ static void init_ssl(void)
...
@@ -116,6 +116,20 @@ static void init_ssl(void)
#endif
#endif
}
}
/**
* This function aims to clean-up the SSL context which
* we allocated.
*/
static
void
uninit_ssl
(
void
)
{
#ifdef GIT_OPENSSL
if
(
git__ssl_ctx
)
{
SSL_CTX_free
(
git__ssl_ctx
);
git__ssl_ctx
=
NULL
;
}
#endif
}
int
git_openssl_set_locking
(
void
)
int
git_openssl_set_locking
(
void
)
{
{
#ifdef GIT_OPENSSL
#ifdef GIT_OPENSSL
...
@@ -333,6 +347,7 @@ int git_libgit2_shutdown(void)
...
@@ -333,6 +347,7 @@ int git_libgit2_shutdown(void)
/* Shut down any subsystems that have global state */
/* Shut down any subsystems that have global state */
git__shutdown
();
git__shutdown
();
uninit_ssl
();
ptr
=
pthread_getspecific
(
_tls_key
);
ptr
=
pthread_getspecific
(
_tls_key
);
pthread_setspecific
(
_tls_key
,
NULL
);
pthread_setspecific
(
_tls_key
,
NULL
);
...
@@ -391,6 +406,7 @@ int git_libgit2_shutdown(void)
...
@@ -391,6 +406,7 @@ int git_libgit2_shutdown(void)
git__shutdown
();
git__shutdown
();
git__global_state_cleanup
(
&
__state
);
git__global_state_cleanup
(
&
__state
);
uninit_ssl
();
return
0
;
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
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