Fixed issue where mysql_free_result can get called twice when a vaild username with an incorrect password is used.
This commit is contained in:
parent
0b35a6f09a
commit
ef006ca407
|
@ -132,12 +132,12 @@ User *zmLoadUser(const char *username, const char *password) {
|
|||
if ( mysql_num_rows(result) == 1 ) {
|
||||
MYSQL_ROW dbrow = mysql_fetch_row(result);
|
||||
User *user = new User(dbrow);
|
||||
mysql_free_result(result);
|
||||
|
||||
if (
|
||||
(! password ) // relay type must be none
|
||||
||
|
||||
verifyPassword(username, password, user->getPassword()) ) {
|
||||
mysql_free_result(result);
|
||||
Info("Authenticated user '%s'", user->getUsername());
|
||||
return user;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue