Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
e7254d38
Commit
e7254d38
authored
Oct 02, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sout_std: fix potential memleaks.
parent
d8fe1e81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
modules/stream_out/standard.c
modules/stream_out/standard.c
+19
-5
No files found.
modules/stream_out/standard.c
View file @
e7254d38
...
...
@@ -213,16 +213,20 @@ static int Open( vlc_object_t *p_this )
psz_bind
=
var_GetNonEmptyString
(
p_stream
,
SOUT_CFG_PREFIX
"bind"
);
psz_path
=
var_GetNonEmptyString
(
p_stream
,
SOUT_CFG_PREFIX
"path"
);
if
(
psz_bind
)
psz_url
=
psz_bind
;
if
(
psz_url
&&
psz_path
)
if
(
psz_bind
&&
psz_path
)
{
if
(
asprintf
(
&
psz_url
,
"%s/%s"
,
psz_url
,
psz_path
)
==
-
1
)
if
(
asprintf
(
&
psz_url
,
"%s/%s"
,
psz_bind
,
psz_path
)
==
-
1
)
psz_url
=
NULL
;
free
(
psz_path
);
}
else
if
(
psz_bind
)
{
psz_url
=
psz_bind
;
psz_bind
=
NULL
;
}
free
(
psz_path
);
var_Get
(
p_stream
,
SOUT_CFG_PREFIX
"dst"
,
&
val
);
if
(
*
val
.
psz_string
)
if
(
*
val
.
psz_string
)
{
free
(
psz_url
);
psz_url
=
val
.
psz_string
;
...
...
@@ -233,6 +237,9 @@ static int Open( vlc_object_t *p_this )
p_sys
=
p_stream
->
p_sys
=
malloc
(
sizeof
(
sout_stream_sys_t
)
);
if
(
!
p_sys
)
{
free
(
psz_access
);
free
(
psz_mux
);
free
(
psz_bind
);
free
(
psz_url
);
return
VLC_ENOMEM
;
}
...
...
@@ -296,6 +303,7 @@ static int Open( vlc_object_t *p_this )
else
{
msg_Err
(
p_stream
,
"no access _and_ no muxer (fatal error)"
);
free
(
psz_bind
);
free
(
psz_url
);
free
(
p_sys
);
return
VLC_EGENERIC
;
...
...
@@ -320,6 +328,9 @@ static int Open( vlc_object_t *p_this )
else
{
msg_Err
(
p_stream
,
"no mux specified or found by extension"
);
free
(
psz_access
);
free
(
psz_bind
);
free
(
psz_url
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -389,6 +400,7 @@ static int Open( vlc_object_t *p_this )
psz_access
,
psz_mux
,
psz_url
);
free
(
psz_access
);
free
(
psz_mux
);
free
(
psz_bind
);
free
(
psz_url
);
free
(
p_sys
);
return
VLC_EGENERIC
;
...
...
@@ -405,6 +417,7 @@ static int Open( vlc_object_t *p_this )
sout_AccessOutDelete
(
p_access
);
free
(
psz_access
);
free
(
psz_mux
);
free
(
psz_bind
);
free
(
psz_url
);
free
(
p_sys
);
return
VLC_EGENERIC
;
...
...
@@ -477,6 +490,7 @@ static int Open( vlc_object_t *p_this )
free
(
psz_access
);
free
(
psz_mux
);
free
(
psz_bind
);
free
(
psz_url
);
if
(
!
sout_AccessOutCanControlPace
(
p_access
)
)
...
...
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