From: Emmanuel Rodriguez Date: Thu, 16 Apr 2009 21:36:45 +0000 (+0200) Subject: Memory leaks fix X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b11e985266979f5d31b50c87bcb4463a7b03f012;p=libchamplain Memory leaks fix Simple leaks that valgrind reports. --- diff --git a/champlain/champlain-map-source.c b/champlain/champlain-map-source.c index d7c1048..c71e79f 100644 --- a/champlain/champlain-map-source.c +++ b/champlain/champlain-map-source.c @@ -403,6 +403,7 @@ champlain_map_source_set_name (ChamplainMapSource *map_source, { ChamplainMapSourcePrivate *priv = map_source->priv; + g_free (priv->name); priv->name = g_strdup (name); } @@ -419,6 +420,7 @@ champlain_map_source_set_license (ChamplainMapSource *map_source, { ChamplainMapSourcePrivate *priv = map_source->priv; + g_free (priv->license); priv->license = g_strdup (license); } diff --git a/champlain/champlain-marker.c b/champlain/champlain-marker.c index 3ef7e01..93652c7 100644 --- a/champlain/champlain-marker.c +++ b/champlain/champlain-marker.c @@ -507,6 +507,7 @@ draw_marker (ChamplainMarker *marker) else if (priv->background != NULL) { clutter_container_remove_actor (CLUTTER_CONTAINER (marker), priv->background); + g_object_unref (G_OBJECT (priv->background)); priv->background = NULL; } diff --git a/champlain/champlain-tile.c b/champlain/champlain-tile.c index c7c2cb0..adc1336 100644 --- a/champlain/champlain-tile.c +++ b/champlain/champlain-tile.c @@ -422,6 +422,7 @@ champlain_tile_set_uri (ChamplainTile *self, ChamplainTilePrivate *priv = GET_PRIVATE (self); + g_free (priv->uri); priv->uri = g_strdup (uri); g_object_notify (G_OBJECT (self), "uri"); } @@ -435,6 +436,7 @@ champlain_tile_set_filename (ChamplainTile *self, ChamplainTilePrivate *priv = GET_PRIVATE (self); + g_free (priv->filename); priv->filename = g_strdup (filename); g_object_notify (G_OBJECT (self), "filename"); }