From d75b15f6530374f9274ccb01fbc7d783a029f32e Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 6 May 2013 06:28:36 -0700 Subject: PIM: fix for pre-computed normalized phone numbers from EDS (FDO #59571, part 1) The method folks_abstract_field_details_get_parameter_values() returns a copy of the values. Must free it, otherwise we leak memory. --- src/dbus/server/pim/locale-factory-boost.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbus/server/pim/locale-factory-boost.cpp b/src/dbus/server/pim/locale-factory-boost.cpp index b47982b9..b266b19b 100644 --- a/src/dbus/server/pim/locale-factory-boost.cpp +++ b/src/dbus/server/pim/locale-factory-boost.cpp @@ -554,11 +554,11 @@ public: // // We restore the right order by sorting, which puts the // country code first, and then joining. - GeeCollection *coll = folks_abstract_field_details_get_parameter_values(phone, "x-evolution-e164"); + GeeCollectionCXX coll(folks_abstract_field_details_get_parameter_values(phone, "x-evolution-e164"), false); if (coll) { std::vector components; components.reserve(2); - BOOST_FOREACH (const gchar *component, GeeStringCollection(coll)) { + BOOST_FOREACH (const gchar *component, GeeStringCollection(coll.get())) { // Empty component represents an unset // country code. Replace with the current // country code to form the full number. -- cgit v1.2.3