[vlc-commits] variables: move lock

Thomas Guillem git at videolan.org
Fri Jun 2 15:58:44 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jun  2 15:56:51 2017 +0200| [f6edc3e5b94577e7d44f9877cde2e2ddc898954d] | committer: Thomas Guillem

variables: move lock

twalk_ctx doesn't need to be locked.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f6edc3e5b94577e7d44f9877cde2e2ddc898954d
---

 src/misc/variables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/misc/variables.c b/src/misc/variables.c
index f2e5478479..121ef5ea70 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -1400,8 +1400,8 @@ char **var_GetAllNames(vlc_object_t *obj)
     DECL_ARRAY(char *) names;
     ARRAY_INIT(names);
 
-    vlc_mutex_lock(&priv->var_lock);
     twalk_ctx = &names;
+    vlc_mutex_lock(&priv->var_lock);
     twalk(priv->var_root, TwalkGetNames);
     vlc_mutex_unlock(&priv->var_lock);
 



More information about the vlc-commits mailing list