vlc | branch: master | Thomas Guillem <[email protected]> | 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);
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to