diff --git a/src/users.c b/src/users.c index 2f6a789..147cbd8 100644 --- a/src/users.c +++ b/src/users.c @@ -54,11 +54,11 @@ static void open_users_db_or_die(sqlite3 **db) { } assert(db != NULL); sqlite3_busy_timeout(*db, 5000); - rc = sqlite3_exec(db, create_sql, 0, 0, &err_msg); + rc = sqlite3_exec(*db, create_sql, 0, 0, &err_msg); if (rc != SQLITE_OK) { dolog("SQL error: %s", err_msg); sqlite3_free(err_msg); - sqlite3_close(db); + sqlite3_close(*db); exit(1); } }