[vlc-devel] commit: HAL service discovery : fix a memory leak ( Rafaël Carré )
git version control
git at videolan.org
Wed Apr 1 15:15:03 CEST 2009
vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Mon Mar 30 19:52:19 2009 +0200| [1ccbac9ed28e0c86b1df2b8145279a83219ab172] | committer: Rafaël Carré
HAL service discovery : fix a memory leak
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1ccbac9ed28e0c86b1df2b8145279a83219ab172
---
modules/services_discovery/hal.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules/services_discovery/hal.c b/modules/services_discovery/hal.c
index 11ff228..a21fef8 100644
--- a/modules/services_discovery/hal.c
+++ b/modules/services_discovery/hal.c
@@ -125,6 +125,7 @@ static int Open( vlc_object_t *p_this )
{
msg_Err( p_sd, "unable to connect to DBUS: %s", dbus_error.message );
dbus_error_free( &dbus_error );
+ libhal_ctx_free( p_sys->p_ctx );
free( p_sys );
return VLC_EGENERIC;
}
@@ -149,6 +150,7 @@ static int Open( vlc_object_t *p_this )
return VLC_SUCCESS;
error:
dbus_error_free( &dbus_error );
+ libhal_ctx_free( p_sys->p_ctx );
free( p_sys );
return VLC_EGENERIC;
}
@@ -177,6 +179,8 @@ static void Close( vlc_object_t *p_this )
}
p_sys->pp_devices = NULL;
+ libhal_ctx_free( p_sys->p_ctx );
+
free( p_sys );
}
More information about the vlc-devel
mailing list