mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-22 15:16:15 -08:00
Cleaned up potential memory leak
This commit is contained in:
@@ -132,8 +132,8 @@ AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString
|
|||||||
} else if (authState == UnknownUser) {
|
} else if (authState == UnknownUser) {
|
||||||
// Change user name so that no two users have the same names,
|
// Change user name so that no two users have the same names,
|
||||||
// don't interfere with registered user names though.
|
// don't interfere with registered user names though.
|
||||||
QSettings *settings = new QSettings("servatrice.ini", QSettings::IniFormat);
|
QSettings settings("servatrice.ini", QSettings::IniFormat);
|
||||||
bool requireReg = settings->value("authentication/regonly", 0).toBool();
|
bool requireReg = settings.value("authentication/regonly", 0).toBool();
|
||||||
if (requireReg) {
|
if (requireReg) {
|
||||||
qDebug("Login denied: registration required");
|
qDebug("Login denied: registration required");
|
||||||
databaseInterface->unlockSessionTables();
|
databaseInterface->unlockSessionTables();
|
||||||
|
|||||||
Reference in New Issue
Block a user