if (rc != SQLITE_DONE) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(g_hAccountDB));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DB_FAILED;
}
rc = _account_query_finalize(hstmt);
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(g_hAccountDB));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DB_FAILED;
}
if (rc != SQLITE_DONE) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(account_db_handle));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DB_FAILED;
}
rc = _account_query_finalize(hstmt);
if (rc != SQLITE_DONE) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(account_db_handle));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DB_FAILED;
}
rc = _account_query_finalize(hstmt);
if (rc == SQLITE_BUSY) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(g_hAccountDB));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DATABASE_BUSY;
} else if (rc != SQLITE_DONE) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(g_hAccountDB));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DB_FAILED;
}