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
a1371209
Commit
a1371209
authored
3 years ago
by
Olivier Dion
Committed by
Sébastien Blin
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
contrib/pjproject: Fix another socket leak
Change-Id: I8c834ea5abefc1f61996ab5098f1d7caf74e36dc
parent
97964808
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/src/pjproject/0014-fix-socket-leak.patch
+18
-7
18 additions, 7 deletions
contrib/src/pjproject/0014-fix-socket-leak.patch
with
18 additions
and
7 deletions
contrib/src/pjproject/0014-fix-socket-leak.patch
+
18
−
7
View file @
a1371209
From
a9b3b09128d1e96cfa4a8ccc74d406c5bf1895db
Mon Sep 17 00:00:00 2001
From
c1093eeb18a4090fd7eac6e8e70a6da1777f0907
Mon Sep 17 00:00:00 2001
From: Olivier Dion <olivier.dion@savoirfairelinux.com>
Date: Mon,
19
Jul 2021
16:49:28
-0400
Subject: [PATCH] pjnath/turn_sock: Fix leak of socket
Date: Mon,
26
Jul 2021
09:52:50
-0400
Subject: [PATCH]
pjnath/turn_sock: Fix leak of socket
Opened socket is not closed on binding and quality of service error. The socket
is owned by the active sock only if everything went well.
---
pjnath/src/pjnath/turn_sock.c |
2
++
1 file changed,
2
insertions(+)
pjnath/src/pjnath/turn_sock.c |
7
++
+++++
1 file changed,
7
insertions(+)
diff --git a/pjnath/src/pjnath/turn_sock.c b/pjnath/src/pjnath/turn_sock.c
index dc6304d9f..
b41e32220
100644
index dc6304d9f..
a453f5b65
100644
--- a/pjnath/src/pjnath/turn_sock.c
+++ b/pjnath/src/pjnath/turn_sock.c
@@ -1195,6 +1195,7 @@
static void turn_on_state(pj_turn_session *sess,
...
...
@@ -29,6 +29,17 @@ index dc6304d9f..b41e32220 100644
pj_turn_sock_destroy(turn_sock);
return;
}
@@ -1262,6 +1264,11 @@
static void turn_on_state(pj_turn_session *sess,
turn_sock->cfg.ioqueue, &asock_cb,
turn_sock,
&turn_sock->active_sock);
+
+ /* Active socket failed to take ownership of `sock` */
+ if (status != PJ_SUCCESS) {
+ pj_sock_close(sock);
+ }
}
#if PJ_HAS_SSL_SOCK
else {
--
2.32.0
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