sd/source/ui/remotecontrol/BluetoothServer.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 693217465486667d38c3b7cd6d654136fe1efc85 Author: Michael Meeks <[email protected]> Date: Sat Jan 26 12:32:17 2013 +1100 sdremote: kill memory corruption / mis-matched alloc/free's. (cherry picked from commit e99b540d8985b87247519c951e6ef65a01b1f5c9) Change-Id: I253f28d7c83371282adde86c8eaadd6f25beff5a Signed-off-by: Miklos Vajna <[email protected]> diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index 41255ba..86a1fa5 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -119,7 +119,7 @@ bool BluetoothServer::isDiscoverable() return false; } - GHashTable* aProperties; + GHashTable* aProperties = NULL; aResult = dbus_g_proxy_call( aAdapter, "GetProperties", &aError, G_TYPE_INVALID, DBUS_TYPE_G_STRING_ANY_HASHTABLE, &aProperties, @@ -136,7 +136,7 @@ bool BluetoothServer::isDiscoverable() gboolean aIsDiscoverable = g_value_get_boolean( (GValue*) g_hash_table_lookup( aProperties, "Discoverable" ) ); - g_free( aProperties ); + g_hash_table_unref( aProperties ); return aIsDiscoverable; #else // defined(LINUX) && defined(ENABLE_DBUS) return false; @@ -188,7 +188,7 @@ void BluetoothServer::setDiscoverable( bool aDiscoverable ) gboolean aPowered = g_value_get_boolean( (GValue*) g_hash_table_lookup( aProperties, "Powered" ) ); - g_free( aProperties ); + g_hash_table_unref( aProperties ); if ( !aPowered ) { SAL_INFO( "sdremote.bluetooth", "Bluetooth adapter not powered, returning" ); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
