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
ee02148b
Commit
ee02148b
authored
Oct 17, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android: fix detached threads leak
parent
17b44188
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
src/android/thread.c
src/android/thread.c
+11
-4
No files found.
src/android/thread.c
View file @
ee02148b
...
...
@@ -308,17 +308,25 @@ int vlc_cond_timedwait (vlc_cond_t *condvar, vlc_mutex_t *p_mutex,
}
/* pthread */
static
void
clean_detached_thread
(
void
*
data
)
{
struct
vlc_thread
*
thread
=
data
;
/* release thread handle */
vlc_mutex_destroy
(
&
thread
->
lock
);
free
(
thread
);
}
static
void
*
detached_thread
(
void
*
data
)
{
vlc_thread_t
th
=
data
;
thread
=
th
;
vlc_cleanup_push
(
clean_detached_thread
,
data
);
th
->
entry
(
th
->
data
);
vlc_cleanup_run
();
/* release thread handle */
vlc_mutex_destroy
(
&
th
->
lock
);
free
(
th
);
return
NULL
;
}
...
...
@@ -454,7 +462,6 @@ void vlc_testcancel (void)
return
;
vlc_sem_post
(
&
thread
->
finished
);
#warning FIXME: memory leak for detached threads
pthread_exit
(
NULL
);
}
...
...
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