summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-01-26 12:32:17 +1100
committerMichael Meeks <michael.meeks@suse.com>2013-01-26 12:56:42 +1100
commite99b540d8985b87247519c951e6ef65a01b1f5c9 (patch)
tree213acd681fe6e1cae4352a7a8b958d93a04235e6 /sd
parentbfe49bf54812a70bcd9ac16342ff02bfd50f475b (diff)
sdremote: kill memory corruption / mis-matched alloc/free's.
Change-Id: I253f28d7c83371282adde86c8eaadd6f25beff5a
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index beca8ebc001e..b9bf82561f04 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -127,7 +127,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,
@@ -144,7 +144,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;
@@ -196,7 +196,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" );