From: Gukhwan Cho Date: Mon, 31 Aug 2015 02:50:35 +0000 (+0900) Subject: fixed prevent X-Git-Tag: accepted/tizen/mobile/20151119.033537~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5b74fbc0e52eae2f1731a6b5e4b783131e5c170;p=platform%2Fcore%2Fpim%2Fcontacts-service.git fixed prevent Change-Id: Ie36f13ff227392017d591daf232a5a7c9f4b52c9 Signed-off-by: Gukhwan Cho --- diff --git a/server/db/ctsvc_db_plugin_activity.c b/server/db/ctsvc_db_plugin_activity.c index 6cf060f..0c7d528 100644 --- a/server/db/ctsvc_db_plugin_activity.c +++ b/server/db/ctsvc_db_plugin_activity.c @@ -352,8 +352,10 @@ static int __ctsvc_db_activity_get_records_with_query(contacts_query_h query, in } } } - else + else { + s_query->projection_count = 0; had_activity_id = true; + } if (false == had_activity_id) { s_query->projection = realloc(s_query->projection, s_query->projection_count+1); diff --git a/server/db/ctsvc_db_plugin_contact.c b/server/db/ctsvc_db_plugin_contact.c index 351775e..f3abf09 100644 --- a/server/db/ctsvc_db_plugin_contact.c +++ b/server/db/ctsvc_db_plugin_contact.c @@ -1471,10 +1471,12 @@ static int __ctsvc_db_contact_get_records_with_query(contacts_query_h query, int } } } - else + else { + s_query->projection_count = 0; had_contact_id = true; + } - if (0 == had_contact_id) { + if (false == had_contact_id) { s_query->projection = realloc(s_query->projection, s_query->projection_count+1); if (NULL == s_query->projection) { CTS_ERR("realloc() Fail"); diff --git a/server/db/ctsvc_db_plugin_my_profile.c b/server/db/ctsvc_db_plugin_my_profile.c index 34a8d48..59888cf 100644 --- a/server/db/ctsvc_db_plugin_my_profile.c +++ b/server/db/ctsvc_db_plugin_my_profile.c @@ -902,8 +902,10 @@ static int __ctsvc_db_my_profile_get_records_with_query(contacts_query_h query, } } } - else + else { + s_query->projection_count = 0; had_my_profile_id = true; + } if (false == had_my_profile_id) { s_query->projection = realloc(s_query->projection, s_query->projection_count+1);