[tracker/tracker-0.10] libtracker-extract: Use GSlice and free TrackerXmpRegion structures
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] libtracker-extract: Use GSlice and free TrackerXmpRegion structures
- Date: Thu, 8 Sep 2011 12:53:30 +0000 (UTC)
commit b38a3c9a59223f6b1ff4eda619d69a2fae9cca07
Author: Martyn Russell <martyn lanedo com>
Date: Tue Sep 6 15:21:04 2011 +0100
libtracker-extract: Use GSlice and free TrackerXmpRegion structures
We weren't freeing the TrackerXmpRegion structures and GSlice makes sense when
we have multiple regions (which is expected).
src/libtracker-extract/tracker-xmp.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-xmp.c b/src/libtracker-extract/tracker-xmp.c
index c5ba856..5966f4c 100644
--- a/src/libtracker-extract/tracker-xmp.c
+++ b/src/libtracker-extract/tracker-xmp.c
@@ -569,7 +569,7 @@ iterate_complex_element (TrackerXmpData *data,
* further statements will put values in that region.
*/
if (g_str_has_suffix (path, "mwg-rs:Area")) {
- region = g_new0 (TrackerXmpRegion, 1);
+ region = g_slice_new0 (TrackerXmpRegion);
data->regions = g_slist_prepend (data->regions, region);
}
}
@@ -727,6 +727,8 @@ xmp_region_free (gpointer data)
g_free (region->height);
g_free (region->link_class);
g_free (region->link_uri);
+
+ g_slice_free (TrackerXmpRegion, region);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]