Fix assertion about not clearing DataCommands objects 63/32763/2
authorSebastian Grabowski <s.grabowski@samsung.com>
Tue, 23 Dec 2014 14:39:17 +0000 (15:39 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 22 Jan 2015 16:05:41 +0000 (08:05 -0800)
The following assertion occurs during exiting security-manager
when any command was executed on security-manager db:
"Condition: m_dataCommandsCount == 0 All stored procedures must be
deleted before disconnecting SqlConnection"
It was caused by not clearing list of DataCommands before destroying db
SqlConnection.

Change-Id: If2151dfc38df23ce9af00a47ac0d7939c13adaa1
Signed-off-by: Sebastian Grabowski <s.grabowski@samsung.com>
src/common/privilege_db.cpp

index 53190fa..2ca3c3a 100644 (file)
@@ -85,6 +85,7 @@ DB::SqlConnection::DataCommandAutoPtr & PrivilegeDb::getQuery(QueryType queryTyp
 
 PrivilegeDb::~PrivilegeDb()
 {
+    m_commands.clear();
     delete mSqlConnection;
 }