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
78c6195f
Commit
78c6195f
authored
Mar 24, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sd_mtp: fix potential memleaks.
parent
a11f0324
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
modules/services_discovery/mtp.c
modules/services_discovery/mtp.c
+7
-3
No files found.
modules/services_discovery/mtp.c
View file @
78c6195f
...
...
@@ -121,7 +121,6 @@ static void Close( vlc_object_t *p_this )
{
services_discovery_t
*
p_sd
=
(
services_discovery_t
*
)
p_this
;
if
(
p_sd
->
p_sys
->
psz_name
!=
NULL
)
free
(
p_sd
->
p_sys
->
psz_name
);
vlc_cancel
(
p_sd
->
p_sys
->
thread
);
vlc_join
(
p_sd
->
p_sys
->
thread
,
NULL
);
...
...
@@ -198,7 +197,10 @@ static int AddDevice( services_discovery_t *p_sd,
{
if
(
!
(
p_sd
->
p_sys
->
pp_items
=
calloc
(
p_sd
->
p_sys
->
i_tracks_num
,
sizeof
(
input_item_t
*
)
)
)
)
{
free
(
psz_name
);
return
VLC_ENOMEM
;
}
p_sd
->
p_sys
->
i_count
=
0
;
while
(
p_track
!=
NULL
)
{
...
...
@@ -240,12 +242,14 @@ static void AddTrack( services_discovery_t *p_sd, LIBMTP_track_t *p_track )
p_track
->
title
)
)
==
NULL
)
{
msg_Err
(
p_sd
,
"Error adding %s, skipping it"
,
p_track
->
filename
);
free
(
psz_string
);
return
;
}
free
(
psz_string
);
input_item_SetArtist
(
p_input
,
p_track
->
artist
);
input_item_SetGenre
(
p_input
,
p_track
->
genre
);
input_item_SetAlbum
(
p_input
,
p_track
->
album
);
free
(
psz_string
);
if
(
asprintf
(
&
psz_string
,
"%d"
,
p_track
->
tracknumber
)
!=
-
1
)
{
input_item_SetTrackNum
(
p_input
,
psz_string
);
...
...
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