aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>2008-12-31 02:24:06 +0800
committerPierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>2009-06-01 23:35:30 +0800
commitc4a935701119a0a9f54a3b62ed42c867c4e1d489 (patch)
tree7104abecd01a615359d5ae7ddccc891a3816a705
parent5faf7832ec78b463808f857a6ffdb8da958355ca (diff)
downloadgsoc2013-empathy-c4a935701119a0a9f54a3b62ed42c867c4e1d489.tar
gsoc2013-empathy-c4a935701119a0a9f54a3b62ed42c867c4e1d489.tar.gz
gsoc2013-empathy-c4a935701119a0a9f54a3b62ed42c867c4e1d489.tar.bz2
gsoc2013-empathy-c4a935701119a0a9f54a3b62ed42c867c4e1d489.tar.lz
gsoc2013-empathy-c4a935701119a0a9f54a3b62ed42c867c4e1d489.tar.xz
gsoc2013-empathy-c4a935701119a0a9f54a3b62ed42c867c4e1d489.tar.zst
gsoc2013-empathy-c4a935701119a0a9f54a3b62ed42c867c4e1d489.zip
Fix key freeing
-rw-r--r--libempathy-gtk/empathy-location-manager.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index caa40b5cd..ac41e3203 100644
--- a/libempathy-gtk/empathy-location-manager.c
+++ b/libempathy-gtk/empathy-location-manager.c
@@ -169,7 +169,7 @@ empathy_location_manager_init (EmpathyLocationManager *location_manager)
location_manager->priv = priv;
priv->is_setup = FALSE;
priv->mc = empathy_mission_control_new ();
- priv->location = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL,
+ priv->location = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_free,
(GDestroyNotify) tp_g_value_slice_free);
// Setup settings status callbacks
@@ -273,7 +273,7 @@ update_timestamp (EmpathyLocationManager *location_manager,
new_value = tp_g_value_slice_new (G_TYPE_STRING);
g_value_set_string (new_value, str_time);
- g_hash_table_insert (priv->location, EMPATHY_LOCATION_TIMESTAMP, new_value);
+ g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_TIMESTAMP), new_value);
DEBUG ("\t - Timestamp: %s", str_time);
}
@@ -325,7 +325,7 @@ position_changed_cb (GeocluePosition *position,
longitude += priv->reduce_value;
new_value = tp_g_value_slice_new (G_TYPE_DOUBLE);
g_value_set_double (new_value, longitude);
- g_hash_table_insert (priv->location, EMPATHY_LOCATION_LON, new_value);
+ g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_LON), new_value);
DEBUG ("\t - Longitude: %f", longitude);
}
if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE)
@@ -333,14 +333,14 @@ position_changed_cb (GeocluePosition *position,
latitude += priv->reduce_value;
new_value = tp_g_value_slice_new (G_TYPE_DOUBLE);
g_value_set_double (new_value, latitude);
- g_hash_table_insert (priv->location, EMPATHY_LOCATION_LAT, new_value);
+ g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_LAT), new_value);
DEBUG ("\t - Latitude: %f", latitude);
}
if (fields & GEOCLUE_POSITION_FIELDS_ALTITUDE)
{
new_value = tp_g_value_slice_new (G_TYPE_DOUBLE);
g_value_set_double (new_value, altitude);
- g_hash_table_insert (priv->location, EMPATHY_LOCATION_ALT, new_value);
+ g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_ALT), new_value);
DEBUG ("\t - Altitude: %f", altitude);
}
@@ -349,7 +349,7 @@ position_changed_cb (GeocluePosition *position,
mean = (horizontal + vertical) / 2.0;
new_value = tp_g_value_slice_new (G_TYPE_DOUBLE);
g_value_set_double (new_value, mean);
- g_hash_table_insert (priv->location, EMPATHY_LOCATION_ACCURACY, new_value);
+ g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_ACCURACY), new_value);
DEBUG ("\t - Accuracy: %f", mean);
}