[vlc-devel] commit: Fix a-few-per-libvlc-instance memory leaks ( Rafaël Carré )
git version control
git at videolan.org
Fri May 16 10:10:29 CEST 2008
vlc | branch: 0.8.6-bugfix | Rafaël Carré <funman at videolan.org> | Fri May 16 09:38:34 2008 +0200| [3033a3df273abe36600523dcb1be98e686b666b5]
Fix a-few-per-libvlc-instance memory leaks
Signed-off-by: Jean-Paul Saman <jpsaman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3033a3df273abe36600523dcb1be98e686b666b5
---
src/libvlc.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/libvlc.c b/src/libvlc.c
index 896b930..5290ac8 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -945,7 +945,7 @@ int VLC_CleanUp( int i_object )
stats_HandlerDestroy( p_stats );
vlc_object_detach( (vlc_object_t*) p_stats );
vlc_object_release( (vlc_object_t *)p_stats );
- // TODO: Delete it
+ vlc_object_destroy( p_stats );
}
/*
@@ -2556,12 +2556,14 @@ static void InitDeviceValues( vlc_t *p_vlc )
DBusError error;
#ifdef HAVE_HAL_1
- ctx = libhal_ctx_new();
+ ctx = libhal_ctx_new();
if( !ctx ) return;
dbus_error_init( &error );
p_connection = dbus_bus_get ( DBUS_BUS_SYSTEM, &error );
if( dbus_error_is_set( &error ) )
{
+ libhal_ctx_shutdown( ctx, &error );
+ libhal_ctx_free( ctx );
dbus_error_free( &error );
return;
}
@@ -2622,6 +2624,7 @@ static void InitDeviceValues( vlc_t *p_vlc )
#ifdef HAVE_HAL_1
libhal_ctx_shutdown( ctx, NULL );
+ libhal_ctx_free( ctx );
#else
hal_shutdown( ctx );
#endif
More information about the vlc-devel
mailing list