Skip to content

Commit

Permalink
driver-sqlite: Fix event usage in driver_sqlite_exec
Browse files Browse the repository at this point in the history
Broken in 850f874
  • Loading branch information
cmouse authored and sirainen committed Sep 6, 2018
1 parent 16f8ce9 commit ab80122
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/lib-sql/driver-sqlite.c
Expand Up @@ -161,7 +161,6 @@ static void driver_sqlite_exec(struct sql_db *_db, const char *query)
{
struct sqlite_db *db = (struct sqlite_db *)_db;
struct sql_result result;
struct event *event;

i_zero(&result);
result.event = event_create(_db->event);
Expand All @@ -171,13 +170,12 @@ static void driver_sqlite_exec(struct sql_db *_db, const char *query)
it here. */
if (driver_sqlite_connect(_db) < 0) {
driver_sqlite_result_log(&result, query);
return;
} else {
db->rc = sqlite3_exec(db->sqlite, query, NULL, NULL, NULL);
driver_sqlite_result_log(&result, query);
}

db->rc = sqlite3_exec(db->sqlite, query, NULL, NULL, NULL);
driver_sqlite_result_log(&result, query);

event_unref(&event);
event_unref(&result.event);
}

static void driver_sqlite_query(struct sql_db *db, const char *query,
Expand Down

0 comments on commit ab80122

Please sign in to comment.