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.
This commit is contained in:
parent
57162cb8c7
commit
d75b15f653
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue