Commit 1ccbac9e authored by Rafaël Carré's avatar Rafaël Carré

HAL service discovery : fix a memory leak

parent 9f26d456
...@@ -125,6 +125,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -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 ); msg_Err( p_sd, "unable to connect to DBUS: %s", dbus_error.message );
dbus_error_free( &dbus_error ); dbus_error_free( &dbus_error );
libhal_ctx_free( p_sys->p_ctx );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -149,6 +150,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -149,6 +150,7 @@ static int Open( vlc_object_t *p_this )
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
dbus_error_free( &dbus_error ); dbus_error_free( &dbus_error );
libhal_ctx_free( p_sys->p_ctx );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -177,6 +179,8 @@ static void Close( vlc_object_t *p_this ) ...@@ -177,6 +179,8 @@ static void Close( vlc_object_t *p_this )
} }
p_sys->pp_devices = NULL; p_sys->pp_devices = NULL;
libhal_ctx_free( p_sys->p_ctx );
free( p_sys ); free( p_sys );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment