[vlc-devel] [PATCH 1/6] Win32 threads: fix memory leak of detached thread

Rémi Denis-Courmont remi at remlab.net
Thu Aug 28 21:55:40 CEST 2014


Le jeudi 28 août 2014, 13:25:05 Hannes Domani a écrit :
> Here is the first of some patches to avoid memory leaks.
> 
> Starting with the simplest one:
> If th->id is not set to NULL, th won't be freed in vlc_thread_cleanup().

The patch seems correct w.r.t. vlc_thread_cleanup(), but what it fixes was 
undefined value usage, not memory leaking.

vlc_set_priority() remains however broken. Since it is never used on detached 
thread, this is an acceptable limitation, but it at least needs to be 
documented (the limitation does not exist on POSIX).

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list