diff options
author | Dewal Agarwal <d1.agarwal@samsung.com> | 2019-02-12 11:23:56 +0530 |
---|---|---|
committer | Abhishek Vijay <abhishek.v@samsung.com> | 2019-02-13 11:31:05 +0000 |
commit | f43d68efdd73fcab3c30c05e576f2f1bab51b259 (patch) | |
tree | f271c67139d311c83e284ad1c79275e02029cbeb | |
parent | 75a8813d9550a12e972ac9833cae85ea9aca1fdd (diff) | |
download | sync-manager-accepted/tizen_5.0_unified.tar.gz sync-manager-accepted/tizen_5.0_unified.tar.bz2 sync-manager-accepted/tizen_5.0_unified.zip |
FIX SVACE: Memory Leaksubmit/tizen_5.0/20190228.043659submit/tizen_5.0/20190215.101104accepted/tizen/5.0/unified/20190306.043030accepted/tizen_5.0_unified
Change-Id: Ic1b10868456e7c9d93da43a9670671db652d15a4
Signed-off-by: Dewal Agarwal <d1.agarwal@samsung.com>
(cherry picked from commit 804bbaad4b34f2252a5e19c005e1271dd23fd7b5)
-rw-r--r-- | src/sync-service/SyncManager_RepositoryEngine.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sync-service/SyncManager_RepositoryEngine.cpp b/src/sync-service/SyncManager_RepositoryEngine.cpp index f97d916..4c4bf99 100644 --- a/src/sync-service/SyncManager_RepositoryEngine.cpp +++ b/src/sync-service/SyncManager_RepositoryEngine.cpp @@ -923,6 +923,8 @@ RepositoryEngine::WhetherApplication(const char *PkgName) { LOG_LOGD("This process is an application"); else LOG_LOGD("This process is a service"); + sqlite3_free(error_msg); + sqlite3_free_table(SqlResult); } else { if (ret == SQLITE_DONE) { LOG_LOGD("There is no sync adapter in the DB"); @@ -934,12 +936,14 @@ RepositoryEngine::WhetherApplication(const char *PkgName) { sqlite3_reset(stmt); sqlite3_finalize(stmt); + sqlite3_free(search_query); db_close(db); return isApp; } sqlite3_reset(stmt); sqlite3_finalize(stmt); + sqlite3_free(search_query); db_close(db); LOG_LOGD("sync-manager DB close"); @@ -1036,6 +1040,8 @@ RepositoryEngine::ReadSyncAdaptersFromDB(void) { pAggregator->dumpSyncAdapters(); LOG_LOGD("result : Read sync adapters from DB complete [%s]", search_query); + sqlite3_free(error_msg); + sqlite3_free_table(SqlResult); } else { if (ret == SQLITE_DONE) LOG_LOGD("There is no sync adapter in the DB"); @@ -1044,6 +1050,7 @@ RepositoryEngine::ReadSyncAdaptersFromDB(void) { sqlite3_reset(stmt); sqlite3_finalize(stmt); + sqlite3_free(search_query); db_close(db); LOG_LOGD("sync-manager DB close"); return 0; @@ -1051,6 +1058,7 @@ RepositoryEngine::ReadSyncAdaptersFromDB(void) { sqlite3_reset(stmt); sqlite3_finalize(stmt); + sqlite3_free(search_query); db_close(db); LOG_LOGD("sync-manager DB close"); @@ -1417,6 +1425,8 @@ RepositoryEngine::StartPackageSyncJobs(const char *PackageName, int uid) { } LOG_LOGD("result : Read sync jobs from DB complete [%s]", search_query); + sqlite3_free(error_msg); + sqlite3_free_table(SqlResult); } else if (ret == SQLITE_DONE) { LOG_LOGD("There is no sync-adapter"); } else { @@ -1499,6 +1509,8 @@ RepositoryEngine::CancelPackageSyncJobs(const char *PackageName, int uid) { } LOG_LOGD("result : Read sync jobs from DB complete [%s]", search_query); + sqlite3_free(error_msg); + sqlite3_free_table(SqlResult); } else if (ret == SQLITE_DONE) { LOG_LOGD("There is no sync-adapter"); } else { @@ -1649,6 +1661,8 @@ RepositoryEngine::ReadSyncJobsDataFromDB(void) { } LOG_LOGD("result : Read sync jobs from DB complete [%s]", search_query); + sqlite3_free(error_msg); + sqlite3_free_table(SqlResult); } else { if (ret == SQLITE_DONE) LOG_LOGD("There is no sync jobs"); |