[libchamplain] Free GError when reporting an error
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Free GError when reporting an error
- Date: Tue, 11 May 2010 23:24:07 +0000 (UTC)
commit 79c97550ff61e554c003ed9b125b0749c23672ce
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date: Tue May 11 23:50:22 2010 +0200
Free GError when reporting an error
champlain/champlain-local-map-data-source.c | 3 ++-
champlain/champlain-memphis-tile-source.c | 1 +
champlain/champlain-network-map-data-source.c | 1 +
3 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/champlain/champlain-local-map-data-source.c b/champlain/champlain-local-map-data-source.c
index 63daaa0..4573830 100644
--- a/champlain/champlain-local-map-data-source.c
+++ b/champlain/champlain-local-map-data-source.c
@@ -157,7 +157,7 @@ champlain_local_map_data_source_load_map_data (ChamplainLocalMapDataSource *self
g_return_if_fail (CHAMPLAIN_IS_LOCAL_MAP_DATA_SOURCE (self)
&& map_path);
- // TODO: Remove test when memphis handles invalid paths properly
+ /* TODO: Remove test when memphis handles invalid paths properly */
if (!g_file_test (map_path, G_FILE_TEST_EXISTS))
{
g_critical ("Error: \"%s\" does not exist.", map_path);
@@ -174,6 +174,7 @@ champlain_local_map_data_source_load_map_data (ChamplainLocalMapDataSource *self
{
g_critical ("Can't load map file: \"%s\"", err->message);
memphis_map_free (map);
+ g_error_free (err);
return;
}
diff --git a/champlain/champlain-memphis-tile-source.c b/champlain/champlain-memphis-tile-source.c
index f2790dd..8d08c0b 100644
--- a/champlain/champlain-memphis-tile-source.c
+++ b/champlain/champlain-memphis-tile-source.c
@@ -552,6 +552,7 @@ champlain_memphis_tile_source_load_rules (
memphis_rule_set_load_from_data (priv->rules, default_rules,
strlen (default_rules), NULL);
g_static_rw_lock_writer_unlock (&MemphisLock);
+ g_error_free (err);
return;
}
}
diff --git a/champlain/champlain-network-map-data-source.c b/champlain/champlain-network-map-data-source.c
index 3e96dbd..ac45b87 100644
--- a/champlain/champlain-network-map-data-source.c
+++ b/champlain/champlain-network-map-data-source.c
@@ -265,6 +265,7 @@ load_map_data_cb (SoupSession *session, SoupMessage *msg,
{
g_critical ("Can't load map data: \"%s\"", err->message);
memphis_map_free (map);
+ g_error_free (err);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]