Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
pistache
Commits
981c588a
Unverified
Commit
981c588a
authored
Mar 09, 2019
by
Dennis Jenkins
Committed by
GitHub
Mar 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #487 from knowledge4igor/fix_memory_leak_in_using_ssl
Fix memory leak in using ssl
parents
37cbf1f9
364ce2f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
include/pistache/peer.h
include/pistache/peer.h
+1
-1
src/common/peer.cc
src/common/peer.cc
+8
-0
src/common/transport.cc
src/common/transport.cc
+1
-0
No files found.
include/pistache/peer.h
View file @
981c588a
...
@@ -38,7 +38,7 @@ public:
...
@@ -38,7 +38,7 @@ public:
Peer
();
Peer
();
Peer
(
const
Address
&
addr
);
Peer
(
const
Address
&
addr
);
~
Peer
()
{}
~
Peer
()
;
const
Address
&
address
()
const
;
const
Address
&
address
()
const
;
const
std
::
string
&
hostname
()
const
;
const
std
::
string
&
hostname
()
const
;
...
...
src/common/peer.cc
View file @
981c588a
...
@@ -28,6 +28,14 @@ Peer::Peer(const Address& addr)
...
@@ -28,6 +28,14 @@ Peer::Peer(const Address& addr)
,
ssl_
(
NULL
)
,
ssl_
(
NULL
)
{
}
{
}
Peer
::~
Peer
()
{
#ifdef PISTACHE_USE_SSL
if
(
ssl_
)
SSL_free
((
SSL
*
)
ssl_
);
#endif
/* PISTACHE_USE_SSL */
}
const
Address
&
Peer
::
address
()
const
const
Address
&
Peer
::
address
()
const
{
{
return
addr
;
return
addr
;
...
...
src/common/transport.cc
View file @
981c588a
...
@@ -182,6 +182,7 @@ Transport::handlePeerDisconnection(const std::shared_ptr<Peer>& peer) {
...
@@ -182,6 +182,7 @@ Transport::handlePeerDisconnection(const std::shared_ptr<Peer>& peer) {
#ifdef PISTACHE_USE_SSL
#ifdef PISTACHE_USE_SSL
if
(
peer
->
ssl
()
!=
NULL
)
{
if
(
peer
->
ssl
()
!=
NULL
)
{
SSL_free
((
SSL
*
)
peer
->
ssl
());
SSL_free
((
SSL
*
)
peer
->
ssl
());
peer
->
associateSSL
(
NULL
);
}
}
#endif
/* PISTACHE_USE_SSL */
#endif
/* PISTACHE_USE_SSL */
...
...
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