another fix for new users

This commit is contained in:
Andrew Pamment 2018-10-18 12:13:10 +10:00
parent aa2e4bced8
commit 999ec8871d

View File

@ -54,11 +54,11 @@ static void open_users_db_or_die(sqlite3 **db) {
} }
assert(db != NULL); assert(db != NULL);
sqlite3_busy_timeout(*db, 5000); 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) { if (rc != SQLITE_OK) {
dolog("SQL error: %s", err_msg); dolog("SQL error: %s", err_msg);
sqlite3_free(err_msg); sqlite3_free(err_msg);
sqlite3_close(db); sqlite3_close(*db);
exit(1); exit(1);
} }
} }