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
4d7fc100
Commit
4d7fc100
authored
Jan 10, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory leak
parent
435f9def
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
src/playlist/services_discovery.c
src/playlist/services_discovery.c
+11
-7
No files found.
src/playlist/services_discovery.c
View file @
4d7fc100
...
...
@@ -233,7 +233,6 @@ static void playlist_sd_item_removed( const vlc_event_t * p_event, void * user_d
int
playlist_ServicesDiscoveryAdd
(
playlist_t
*
p_playlist
,
const
char
*
psz_modules
)
{
const
char
*
psz_parser
=
psz_modules
?:
""
;
int
retval
=
VLC_SUCCESS
;
for
(;;)
{
...
...
@@ -262,7 +261,15 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modul
p_sd
=
vlc_sd_Create
(
(
vlc_object_t
*
)
p_playlist
);
if
(
!
p_sd
)
continue
;
return
VLC_ENOMEM
;
/* Free in playlist_ServicesDiscoveryRemove */
p_sds
=
malloc
(
sizeof
(
struct
playlist_services_discovery_support_t
)
);
if
(
!
p_sds
)
{
vlc_sd_Destroy
(
p_sd
);
return
VLC_ENOMEM
;
}
vlc_event_attach
(
services_discovery_EventManager
(
p_sd
),
vlc_ServicesDiscoveryItemAdded
,
...
...
@@ -287,6 +294,7 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modul
if
(
!
vlc_sd_Start
(
p_sd
,
psz_plugin
)
)
{
vlc_sd_Destroy
(
p_sd
);
free
(
p_sds
);
return
VLC_EGENERIC
;
}
...
...
@@ -298,10 +306,6 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modul
PL_UNLOCK
;
free
(
psz
);
/* Free in playlist_ServicesDiscoveryRemove */
p_sds
=
malloc
(
sizeof
(
struct
playlist_services_discovery_support_t
)
);
if
(
!
p_sds
)
return
VLC_ENOMEM
;
/* We want tree-view for service directory */
p_one
->
p_input
->
b_prefers_tree
=
true
;
...
...
@@ -315,7 +319,7 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modul
}
return
retval
;
return
VLC_SUCCESS
;
}
int
playlist_ServicesDiscoveryRemove
(
playlist_t
*
p_playlist
,
...
...
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