diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2013-05-06 06:28:36 -0700 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2013-05-13 17:51:38 +0200 |
commit | d75b15f6530374f9274ccb01fbc7d783a029f32e (patch) | |
tree | 672b7e25e3a95c072f7a5eda30c2d54868516ec4 | |
parent | 57162cb8c79c91718e3275ace31001f38c731d43 (diff) |
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.
-rw-r--r-- | src/dbus/server/pim/locale-factory-boost.cpp | 4 |
1 files 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<std::string> 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. |