Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
a366f66c
Commit
a366f66c
authored
Nov 28, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* input: avoid double free/release when InitStream fail.
parent
47a1f97e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
2 deletions
+46
-2
src/input/input.c
src/input/input.c
+46
-2
No files found.
src/input/input.c
View file @
a366f66c
...
...
@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: input.c,v 1.26
6 2003/11/27 05:46:0
1 fenrir Exp $
* $Id: input.c,v 1.26
7 2003/11/28 17:04:3
1 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -309,8 +309,12 @@ static int RunThread( input_thread_t *p_input )
{
/* If we failed, wait before we are killed, and exit */
p_input
->
b_error
=
1
;
ErrorThread
(
p_input
);
EndThread
(
p_input
);
/* Tell we're dead */
p_input
->
b_dead
=
1
;
return
0
;
}
...
...
@@ -605,6 +609,12 @@ static int InitThread( input_thread_t * p_input )
if
(
input_AccessInit
(
p_input
)
==
-
1
)
{
free
(
p_input
->
psz_source
);
if
(
p_input
->
psz_dupsource
!=
NULL
)
{
free
(
p_input
->
psz_dupsource
);
}
return
VLC_EGENERIC
;
}
...
...
@@ -617,6 +627,13 @@ static int InitThread( input_thread_t * p_input )
{
msg_Err
(
p_input
,
"cannot start stream output instance, aborting"
);
free
(
val
.
psz_string
);
input_AccessEnd
(
p_input
);
free
(
p_input
->
psz_source
);
if
(
p_input
->
psz_dupsource
!=
NULL
)
{
free
(
p_input
->
psz_dupsource
);
}
return
VLC_EGENERIC
;
}
free
(
val
.
psz_string
);
...
...
@@ -655,6 +672,13 @@ static int InitThread( input_thread_t * p_input )
{
sout_DeleteInstance
(
p_input
->
stream
.
p_sout
);
}
input_AccessEnd
(
p_input
);
free
(
p_input
->
psz_source
);
if
(
p_input
->
psz_dupsource
!=
NULL
)
{
free
(
p_input
->
psz_dupsource
);
}
return
VLC_EGENERIC
;
}
...
...
@@ -686,6 +710,12 @@ static int InitThread( input_thread_t * p_input )
{
sout_DeleteInstance
(
p_input
->
stream
.
p_sout
);
}
input_AccessEnd
(
p_input
);
free
(
p_input
->
psz_source
);
if
(
p_input
->
psz_dupsource
!=
NULL
)
{
free
(
p_input
->
psz_dupsource
);
}
return
VLC_EGENERIC
;
}
}
...
...
@@ -698,11 +728,18 @@ static int InitThread( input_thread_t * p_input )
/* should nver occur yet */
msg_Err
(
p_input
,
"cannot create stream_t !"
);
module_Unneed
(
p_input
,
p_input
->
p_access
);
if
(
p_input
->
stream
.
p_sout
!=
NULL
)
{
sout_DeleteInstance
(
p_input
->
stream
.
p_sout
);
}
input_AccessEnd
(
p_input
);
free
(
p_input
->
psz_source
);
if
(
p_input
->
psz_dupsource
!=
NULL
)
{
free
(
p_input
->
psz_dupsource
);
}
return
VLC_EGENERIC
;
}
...
...
@@ -716,12 +753,19 @@ static int InitThread( input_thread_t * p_input )
{
msg_Err
(
p_input
,
"no suitable demux module for `%s/%s://%s'"
,
p_input
->
psz_access
,
p_input
->
psz_demux
,
p_input
->
psz_name
);
stream_Release
(
p_input
->
s
);
module_Unneed
(
p_input
,
p_input
->
p_access
);
if
(
p_input
->
stream
.
p_sout
!=
NULL
)
{
sout_DeleteInstance
(
p_input
->
stream
.
p_sout
);
}
input_AccessEnd
(
p_input
);
free
(
p_input
->
psz_source
);
if
(
p_input
->
psz_dupsource
!=
NULL
)
{
free
(
p_input
->
psz_dupsource
);
}
return
VLC_EGENERIC
;
}
...
...
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