ret = contacts_list_get_current_record_p(contacts, &number);
if (ret != CONTACTS_ERROR_NONE) {
MSG_DEBUG("contacts_list_get_current_record_p() Error [%d]", ret);
+ contacts_query_destroy(query);
+ contacts_filter_destroy(filter);
contacts_list_destroy(contacts, true);
return MSG_SUCCESS;
}
ret = contacts_record_get_int(number, _contacts_contact_number.contact_id, &index);
if (ret != CONTACTS_ERROR_NONE) {
MSG_DEBUG("contacts_record_get_int() Error [%d]", ret);
+ contacts_query_destroy(query);
+ contacts_filter_destroy(filter);
contacts_list_destroy(contacts, true);
contacts_record_destroy(number, true);
return MSG_SUCCESS;
ret = contacts_db_get_record(_contacts_contact._uri, index, &contact);
if (ret != CONTACTS_ERROR_NONE) {
MSG_DEBUG("contacts_db_get_record() Error [%d]", ret);
+ contacts_query_destroy(query);
+ contacts_filter_destroy(filter);
contacts_list_destroy(contacts, true);
contacts_record_destroy(contact, true);
contacts_record_destroy(number, true);
ret = contacts_list_get_current_record_p(contacts, &email);
if (ret != CONTACTS_ERROR_NONE) {
MSG_DEBUG("contacts_list_get_current_record_p() Error [%d]", ret);
+ contacts_query_destroy(query);
+ contacts_filter_destroy(filter);
contacts_list_destroy(contacts, true);
return MSG_SUCCESS;
}
ret = contacts_record_get_int(email, _contacts_contact_email.contact_id, &index);
if (ret != CONTACTS_ERROR_NONE) {
MSG_DEBUG("contacts_record_get_int() Error [%d]", ret);
+ contacts_query_destroy(query);
+ contacts_filter_destroy(filter);
contacts_list_destroy(contacts, true);
contacts_record_destroy(email, true);
return MSG_SUCCESS;
ret = contacts_db_get_record(_contacts_contact._uri, index, &contact);
if (ret != CONTACTS_ERROR_NONE) {
MSG_DEBUG("contacts_db_get_record() Error [%d]", ret);
+ contacts_query_destroy(query);
+ contacts_filter_destroy(filter);
contacts_list_destroy(contacts, true);
contacts_record_destroy(contact, true);
contacts_record_destroy(email, true);
}
}
+ contacts_query_destroy(query);
+ contacts_filter_destroy(filter);
contacts_list_destroy(contacts, true);
// Name Info
if (ret != CONTACTS_ERROR_NONE) {
MSG_DEBUG("contacts_db_get_changes_by_version() Error [%d]", ret);
+ contacts_list_destroy(contactsList, true);
return;
}