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
4884854b
Commit
4884854b
authored
Mar 16, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: fix objects leak.
parent
e0a09aa3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
src/misc/update.c
src/misc/update.c
+21
-3
No files found.
src/misc/update.c
View file @
4884854b
...
@@ -1381,6 +1381,14 @@ void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), void
...
@@ -1381,6 +1381,14 @@ void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), void
{
{
assert
(
p_update
);
assert
(
p_update
);
// If the object already exist, destroy it
if
(
p_update
->
p_check
)
{
vlc_object_kill
(
p_update
->
p_check
);
vlc_thread_join
(
p_update
->
p_check
);
vlc_object_release
(
p_update
->
p_check
);
}
update_check_thread_t
*
p_uct
=
update_check_thread_t
*
p_uct
=
vlc_custom_create
(
p_update
->
p_libvlc
,
sizeof
(
*
p_uct
),
vlc_custom_create
(
p_update
->
p_libvlc
,
sizeof
(
*
p_uct
),
VLC_OBJECT_GENERIC
,
"update check"
);
VLC_OBJECT_GENERIC
,
"update check"
);
...
@@ -1473,10 +1481,12 @@ static char *size_str( long int l_size )
...
@@ -1473,10 +1481,12 @@ static char *size_str( long int l_size )
void
update_WaitDownload
(
update_t
*
p_update
)
void
update_WaitDownload
(
update_t
*
p_update
)
{
{
if
(
p_update
->
p_download
)
if
(
p_update
->
p_download
)
{
vlc_thread_join
(
p_update
->
p_download
);
vlc_thread_join
(
p_update
->
p_download
);
vlc_object_release
(
p_update
->
p_download
);
vlc_object_release
(
p_update
->
p_download
);
p_update
->
p_download
=
NULL
;
p_update
->
p_download
=
NULL
;
}
}
}
static
void
*
update_DownloadReal
(
vlc_object_t
*
p_this
);
static
void
*
update_DownloadReal
(
vlc_object_t
*
p_this
);
...
@@ -1494,6 +1504,14 @@ void update_Download( update_t *p_update, const char *destination )
...
@@ -1494,6 +1504,14 @@ void update_Download( update_t *p_update, const char *destination )
{
{
assert
(
p_update
);
assert
(
p_update
);
// If the object already exist, destroy it
if
(
p_update
->
p_download
)
{
vlc_object_kill
(
p_update
->
p_download
);
vlc_thread_join
(
p_update
->
p_download
);
vlc_object_release
(
p_update
->
p_download
);
}
update_download_thread_t
*
p_udt
=
update_download_thread_t
*
p_udt
=
vlc_custom_create
(
p_update
->
p_libvlc
,
sizeof
(
*
p_udt
),
vlc_custom_create
(
p_update
->
p_libvlc
,
sizeof
(
*
p_udt
),
VLC_OBJECT_GENERIC
,
"update download"
);
VLC_OBJECT_GENERIC
,
"update download"
);
...
...
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