[vlc-commits] commit: lua_extensions: no need to lock the object as we are inside a call to module need with a freshly created object . ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Sat Oct 9 10:14:32 CEST 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Oct 8 20:12:08 2010 +0200| [4cda86b74f8dfce0c48c8952416c48d3c6209df9] | committer: Rémi Duraffort
lua_extensions: no need to lock the object as we are inside a call to module need with a freshly created object.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4cda86b74f8dfce0c48c8952416c48d3c6209df9
---
modules/misc/lua/extension.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/modules/misc/lua/extension.c b/modules/misc/lua/extension.c
index 745350f..df7a465 100644
--- a/modules/misc/lua/extension.c
+++ b/modules/misc/lua/extension.c
@@ -221,15 +221,10 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
msg_Dbg( p_mgr, "Scanning Lua script %s", psz_script );
- vlc_mutex_lock( &p_mgr->lock );
-
/* Create new script descriptor */
extension_t *p_ext = ( extension_t* ) calloc( 1, sizeof( extension_t ) );
if( !p_ext )
- {
- vlc_mutex_unlock( &p_mgr->lock );
return 0;
- }
p_ext->psz_name = strdup( psz_script );
p_ext->p_sys = (extension_sys_t*) calloc( 1, sizeof( extension_sys_t ) );
@@ -238,7 +233,6 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
free( p_ext->psz_name );
free( p_ext->p_sys );
free( p_ext );
- vlc_mutex_unlock( &p_mgr->lock );
return 0;
}
p_ext->p_sys->p_mgr = p_mgr;
@@ -404,7 +398,6 @@ exit:
ARRAY_APPEND( p_mgr->extensions, p_ext );
}
- vlc_mutex_unlock( &p_mgr->lock );
/* Continue batch execution */
return VLC_EGENERIC;
}
More information about the vlc-commits
mailing list