[vlc-commits] Partly revert b192dc3c38ac39d1dc0f5f2a55fd4f3abbcbbec0
Rafaël Carré
git at videolan.org
Tue Jan 24 03:17:59 CET 2012
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Jan 23 21:14:50 2012 -0500| [40e6d6d1a53c582409d1f37d6742e5b3dd4e3d1e] | committer: Rafaël Carré
Partly revert b192dc3c38ac39d1dc0f5f2a55fd4f3abbcbbec0
Those objects and shared library handle are not guaranteed to exist
if the Clean() function is called in Open() error path.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=40e6d6d1a53c582409d1f37d6742e5b3dd4e3d1e
---
modules/audio_output/opensles_android.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/modules/audio_output/opensles_android.c b/modules/audio_output/opensles_android.c
index 1226a20..630981a 100644
--- a/modules/audio_output/opensles_android.c
+++ b/modules/audio_output/opensles_android.c
@@ -99,11 +99,15 @@ vlc_module_end ()
static void Clean( aout_sys_t *p_sys )
{
- Destroy( p_sys->playerObject );
- Destroy( p_sys->outputMixObject );
- Destroy( p_sys->engineObject );
-
- dlclose( p_sys->p_so_handle );
+ if( p_sys->playerObject )
+ Destroy( p_sys->playerObject );
+ if( p_sys->outputMixObject )
+ Destroy( p_sys->outputMixObject );
+ if( p_sys->engineObject )
+ Destroy( p_sys->engineObject );
+
+ if( p_sys->p_so_handle )
+ dlclose( p_sys->p_so_handle );
free( p_sys );
}
More information about the vlc-commits
mailing list