contacts_list_destroy(list, true);
free(view_uri);
free(keyword);
+ if (start_match)
+ free(start_match);
+ if (end_match)
+ free(end_match);
ctsvc_server_start_timeout();
return;
}
contacts_list_destroy(list, true);
free(view_uri);
free(keyword);
+ if (start_match)
+ free(start_match);
+ if (end_match)
+ free(end_match);
ctsvc_server_start_timeout();
return;
}
contacts_list_destroy(list, true);
contacts_query_destroy(query);
free(keyword);
+ if (start_match)
+ free(start_match);
+ if (end_match)
+ free(end_match);
ctsvc_server_start_timeout();
return;
}
}
ret = ctsvc_begin_trans();
- RETVM_IF(CONTACTS_ERROR_NONE != ret, CONTACTS_ERROR_DB, "DB Fail");
+ if (ret != CONTACTS_ERROR_NONE) {
+ g_slist_free(list);
+ ERR("DB Fail");
+ return CONTACTS_ERROR_DB;
+ }
cursor = g_slist_nth(list, 0);
while (cursor) {
}
ret = ctsvc_begin_trans();
- RETVM_IF(CONTACTS_ERROR_NONE != ret, CONTACTS_ERROR_DB, "DB Fail");
+ if (ret != CONTACTS_ERROR_NONE) {
+ g_slist_free(list);
+ ERR("DB Fail");
+ return CONTACTS_ERROR_DB;
+ }
cursor = g_slist_nth(list, 0);
while (cursor) {