diff options
author | HyeKyoung Hwang <cookie@samsung.com> | 2017-04-25 17:23:31 +0900 |
---|---|---|
committer | HyeKyoung Hwang <cookie@samsung.com> | 2017-04-25 17:23:31 +0900 |
commit | 8de306895850147fafd596bc0fd613d49798ba00 (patch) | |
tree | 542097b5089d476d049c6b40ec0558d5a851e0c2 | |
parent | b8152419393ed3fcdbf7b20c450cb4d4099f9526 (diff) | |
download | browser-provider-8de306895850147fafd596bc0fd613d49798ba00.tar.gz browser-provider-8de306895850147fafd596bc0fd613d49798ba00.tar.bz2 browser-provider-8de306895850147fafd596bc0fd613d49798ba00.zip |
Fix Svace Issuetizen_4.0.m1_releasesubmit/tizen/20170425.084958accepted/tizen/unified/20170426.061709
Change-Id: I820ca70a99e67e26e9c4b39b6e21a1dd6dfcbb1d
Signed-off-by: HyeKyoung Hwang <cookie@samsung.com>
-rwxr-xr-x | provider/browser-provider-bookmarks.c | 6 | ||||
-rwxr-xr-x | provider/browser-provider-history.c | 6 | ||||
-rwxr-xr-x | provider/browser-provider-requests.c | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/provider/browser-provider-bookmarks.c b/provider/browser-provider-bookmarks.c index bd11b48..91d700b 100755 --- a/provider/browser-provider-bookmarks.c +++ b/provider/browser-provider-bookmarks.c @@ -280,7 +280,8 @@ static bp_error_defs __bp_bookmark_get_cond_ids(int sock, const int raw_search) bp_ipc_send_custom_type(sock, &ids_count, sizeof(int)); bp_ipc_send_custom_type(sock, ids, (sizeof(int) * ids_count)); } - free(ids); + if (ids != NULL) + free(ids); free(keyword); if (conditions != NULL) sqlite3_free(conditions); @@ -433,7 +434,8 @@ static bp_error_defs __bp_bookmark_get_cond_timestamp_ids(int sock) bp_ipc_send_custom_type(sock, &ids_count, sizeof(int)); bp_ipc_send_custom_type(sock, ids, (sizeof(int) * ids_count)); } - free(ids); + if (ids != NULL) + free(ids); free(keyword); if (conditions != NULL) sqlite3_free(conditions); diff --git a/provider/browser-provider-history.c b/provider/browser-provider-history.c index 00a08b5..2731e81 100755 --- a/provider/browser-provider-history.c +++ b/provider/browser-provider-history.c @@ -275,7 +275,8 @@ static bp_error_defs __bp_history_get_cond_ids(int sock, const int raw_search) bp_ipc_send_custom_type(sock, &ids_count, sizeof(int)); bp_ipc_send_custom_type(sock, ids, (sizeof(int) * ids_count)); } - free(ids); + if (ids != NULL) + free(ids); free(keyword); if (conditions != NULL) sqlite3_free(conditions); @@ -410,7 +411,8 @@ static bp_error_defs __bp_history_get_cond_timestamp_ids(int sock) bp_ipc_send_custom_type(sock, &ids_count, sizeof(int)); bp_ipc_send_custom_type(sock, ids, (sizeof(int) * ids_count)); } - free(ids); + if (ids != NULL) + free(ids); free(keyword); if (conditions != NULL) sqlite3_free(conditions); diff --git a/provider/browser-provider-requests.c b/provider/browser-provider-requests.c index e1668a4..39d5c6e 100755 --- a/provider/browser-provider-requests.c +++ b/provider/browser-provider-requests.c @@ -1563,6 +1563,8 @@ bp_error_defs bp_common_get_ids(sqlite3 *handle, *ids_count = inquired_ids_count; } else { free(inquired_ids); + *ids = NULL; + *ids_count = -1; } return errorcode; } |