Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
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
cpp-libs
libnice
Commits
b6925dc8
Commit
b6925dc8
authored
Jul 31, 2019
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test-udp-turn-fragmentation: Avoid leaking test socket
parent
1149e7b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
tests/test-udp-turn-fragmentation.c
tests/test-udp-turn-fragmentation.c
+8
-4
No files found.
tests/test-udp-turn-fragmentation.c
View file @
b6925dc8
...
...
@@ -113,13 +113,13 @@ test_socket_is_reliable (NiceSocket *sock) {
static
void
test_socket_close
(
NiceSocket
*
sock
)
{
g_free
(
sock
->
priv
);
g_free
(
sock
->
priv
);
}
static
NiceSocket
*
test_socket_new
(
GSList
*
msg_data
)
{
NiceSocket
*
sock
=
g_
new0
(
NiceSocket
,
1
);
NiceSocket
*
sock
=
g_
slice_new0
(
NiceSocket
);
TestSocketPriv
*
priv
=
g_new0
(
TestSocketPriv
,
1
);
priv
->
msg_data
=
msg_data
;
priv
->
current_msg
=
msg_data
;
...
...
@@ -146,6 +146,7 @@ tcp_turn_fragmentation (void)
GSList
*
test_messages
=
generate_test_messages
();
NiceAddress
addr
;
NiceSocket
*
turnsock
;
NiceSocket
*
testsock
;
NiceInputMessage
recv_messages
[
N_RECV_MESSAGES
];
GInputVector
recv_vectors
[
N_RECV_MESSAGES
];
...
...
@@ -167,8 +168,10 @@ tcp_turn_fragmentation (void)
nice_address_set_from_string
(
&
addr
,
"127.0.0.1"
);
testsock
=
test_socket_new
(
test_messages
);
turnsock
=
nice_udp_turn_socket_new
(
NULL
,
&
addr
,
test
_socket_new
(
test_messages
)
,
&
addr
,
""
,
""
,
test
sock
,
&
addr
,
""
,
""
,
NICE_TURN_SOCKET_COMPATIBILITY_OC2007
);
li
=
test_messages
;
...
...
@@ -197,7 +200,8 @@ tcp_turn_fragmentation (void)
}
g_slist_free
(
test_messages
);
nice_socket_free
(
turnsock
);
nice_socket_free
(
turnsock
);
nice_socket_free
(
testsock
);
}
int
...
...
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