Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc
Commits
cdf34ed9
Commit
cdf34ed9
authored
Feb 19, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bunch of meomory object and descriptor leaks
parent
9cb2370c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
modules/access_output/udp.c
modules/access_output/udp.c
+15
-2
No files found.
modules/access_output/udp.c
View file @
cdf34ed9
...
...
@@ -270,13 +270,19 @@ static int Open( vlc_object_t *p_this )
||
var_Create
(
p_access
,
"src-port"
,
VLC_VAR_INTEGER
)
||
var_Create
(
p_access
,
"dst-addr"
,
VLC_VAR_STRING
)
||
var_Create
(
p_access
,
"src-addr"
,
VLC_VAR_STRING
))
{
free
(
p_sys
);
free
(
psz_dst_addr
);
return
VLC_ENOMEM
;
}
p_sys
->
p_thread
=
vlc_object_create
(
p_access
,
sizeof
(
sout_access_thread_t
)
);
if
(
!
p_sys
->
p_thread
)
{
msg_Err
(
p_access
,
"out of memory"
);
free
(
p_sys
);
free
(
psz_dst_addr
);
return
VLC_ENOMEM
;
}
...
...
@@ -288,9 +294,13 @@ static int Open( vlc_object_t *p_this )
p_sys
->
p_thread
->
p_empty_blocks
=
block_FifoNew
(
p_access
);
i_handle
=
net_ConnectDgram
(
p_this
,
psz_dst_addr
,
i_dst_port
,
-
1
,
proto
);
free
(
psz_dst_addr
);
if
(
i_handle
==
-
1
)
{
msg_Err
(
p_access
,
"failed to create %s socket"
,
protoname
);
vlc_object_destroy
(
p_sys
->
p_thread
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
else
...
...
@@ -337,6 +347,9 @@ static int Open( vlc_object_t *p_this )
if
(
p_sys
->
b_rtpts
&&
OpenRTCP
(
p_access
))
{
msg_Err
(
p_access
,
"cannot initialize RTCP sender"
);
net_Close
(
i_handle
);
vlc_object_destroy
(
p_sys
->
p_thread
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -344,7 +357,9 @@ static int Open( vlc_object_t *p_this )
VLC_THREAD_PRIORITY_HIGHEST
,
VLC_FALSE
)
)
{
msg_Err
(
p_access
->
p_sout
,
"cannot spawn sout access thread"
);
net_Close
(
i_handle
);
vlc_object_destroy
(
p_sys
->
p_thread
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -354,8 +369,6 @@ static int Open( vlc_object_t *p_this )
p_access
->
pf_seek
=
Seek
;
free
(
psz_dst_addr
);
/* update p_sout->i_out_pace_nocontrol */
p_access
->
p_sout
->
i_out_pace_nocontrol
++
;
...
...
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