Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
998fa7f2
Commit
998fa7f2
authored
Aug 06, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux_shoutcast: fix object leak in case of error.
parent
7dfd525e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
modules/demux/playlist/shoutcast.c
modules/demux/playlist/shoutcast.c
+15
-9
No files found.
modules/demux/playlist/shoutcast.c
View file @
998fa7f2
...
...
@@ -75,9 +75,7 @@ int Import_Shoutcast( vlc_object_t *p_this )
p_demux
->
p_sys
->
p_xml_reader
=
NULL
;
/* Do we want to list adult content ? */
var_Create
(
p_demux
,
"shoutcast-show-adult"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
p_demux
->
p_sys
->
b_adult
=
var_GetBool
(
p_demux
,
"shoutcast-show-adult"
);
p_demux
->
p_sys
->
b_adult
=
var_CreateGetBool
(
p_demux
,
"shoutcast-show-adult"
);
return
VLC_SUCCESS
;
}
...
...
@@ -107,17 +105,19 @@ static int Demux( demux_t *p_demux )
p_sys
->
p_current_input
=
p_current_input
;
p_xml
=
p_sys
->
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
return
-
1
;
if
(
!
p_xml
)
goto
error
;
p_xml_reader
=
xml_ReaderCreate
(
p_xml
,
p_demux
->
s
);
if
(
!
p_xml_reader
)
return
-
1
;
if
(
!
p_xml_reader
)
goto
error
;
p_sys
->
p_xml_reader
=
p_xml_reader
;
/* check root node */
if
(
xml_ReaderRead
(
p_xml_reader
)
!=
1
)
{
msg_Err
(
p_demux
,
"invalid file (no root node)"
);
return
-
1
;
goto
error
;
}
if
(
xml_ReaderNodeType
(
p_xml_reader
)
!=
XML_READER_STARTELEM
||
...
...
@@ -128,24 +128,30 @@ static int Demux( demux_t *p_demux )
msg_Err
(
p_demux
,
"invalid root node %i, %s"
,
xml_ReaderNodeType
(
p_xml_reader
),
psz_eltname
);
free
(
psz_eltname
);
return
-
1
;
goto
error
;
}
if
(
!
strcmp
(
psz_eltname
,
"genrelist"
)
)
{
/* we're reading a genre list */
free
(
psz_eltname
);
if
(
DemuxGenre
(
p_demux
)
)
return
-
1
;
if
(
DemuxGenre
(
p_demux
)
)
goto
error
;
}
else
{
/* we're reading a station list */
free
(
psz_eltname
);
if
(
DemuxStation
(
p_demux
)
)
return
-
1
;
if
(
DemuxStation
(
p_demux
)
)
goto
error
;
}
HANDLE_PLAY_AND_RELEASE
;
return
0
;
/* Needed for correct operation of go back */
error:
HANDLE_PLAY_AND_RELEASE
;
return
-
1
;
}
#define GET_VALUE( a ) \
...
...
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