Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue 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
savoirfairelinux
jami-daemon
Commits
0992f941
Commit
0992f941
authored
14 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#4243] Fix memory leak in AudioSrtpSession
parent
ea02875a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp
+25
-0
25 additions, 0 deletions
sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp
sflphone-common/src/audio/audiortp/AudioSrtpSession.h
+2
-0
2 additions, 0 deletions
sflphone-common/src/audio/audiortp/AudioSrtpSession.h
with
27 additions
and
0 deletions
sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp
+
25
−
0
View file @
0992f941
...
...
@@ -58,10 +58,25 @@ AudioSrtpSession::AudioSrtpSession (ManagerImpl * manager, SIPCall * sipcall) :
_localMasterSaltLength
(
0
),
_remoteMasterKeyLength
(
0
),
_remoteMasterSaltLength
(
0
),
_remoteCryptoCtx
(
NULL
),
_localCryptoCtx
(
NULL
),
_remoteOfferIsSet
(
false
)
{
}
AudioSrtpSession
::~
AudioSrtpSession
()
{
if
(
_remoteCryptoCtx
)
{
delete
_remoteCryptoCtx
;
_remoteCryptoCtx
=
NULL
;
}
if
(
_localCryptoCtx
)
{
delete
_localCryptoCtx
;
_localCryptoCtx
=
NULL
;
}
}
void
AudioSrtpSession
::
initLocalCryptoInfo
()
{
_debug
(
"AudioSrtp: Set cryptographic info for this rtp session"
);
...
...
@@ -241,6 +256,11 @@ void AudioSrtpSession::initializeRemoteCryptoContext (void)
CryptoSuiteDefinition
crypto
=
sfl
::
CryptoSuites
[
_remoteCryptoSuite
];
if
(
_remoteCryptoCtx
)
{
delete
_remoteCryptoCtx
;
_remoteCryptoCtx
=
NULL
;
}
_remoteCryptoCtx
=
new
ost
::
CryptoContext
(
0x0
,
0
,
// roc,
0L
,
// keydr,
...
...
@@ -263,6 +283,11 @@ void AudioSrtpSession::initializeLocalCryptoContext (void)
CryptoSuiteDefinition
crypto
=
sfl
::
CryptoSuites
[
_localCryptoSuite
];
if
(
_localCryptoCtx
)
{
delete
_localCryptoCtx
;
_localCryptoCtx
=
NULL
;
}
_localCryptoCtx
=
new
ost
::
CryptoContext
(
OutgoingDataQueue
::
getLocalSSRC
(),
0
,
// roc,
0L
,
// keydr,
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/audio/audiortp/AudioSrtpSession.h
+
2
−
0
View file @
0992f941
...
...
@@ -83,6 +83,8 @@ class AudioSrtpSession : public ost::SymmetricRTPSession, public AudioRtpSession
*/
AudioSrtpSession
(
ManagerImpl
*
manager
,
SIPCall
*
sipcall
);
~
AudioSrtpSession
();
/**
* Used to get sdp crypto header to be included in sdp session. This
* method must be called befor setRemoteCryptoInfo in case of an
...
...
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