Fix memory leak in _handle_user_command()
This commit is contained in:
parent
67a511cc3e
commit
e0cd3f7894
1 changed files with 1 additions and 2 deletions
|
@ -341,6 +341,7 @@ namespace pvpgn
|
|||
strtolower(pass);
|
||||
|
||||
bnet_hash(&pass_hash, std::strlen(pass), pass);
|
||||
xfree((void *)pass);
|
||||
|
||||
tempacct = accountlist_create_account(user, hash_get_str(pass_hash));
|
||||
if (!tempacct) {
|
||||
|
@ -348,8 +349,6 @@ namespace pvpgn
|
|||
irc_send(conn, RPL_BAD_LOGIN, ":Account creating failed");
|
||||
return 0;
|
||||
}
|
||||
if (pass)
|
||||
xfree((void *)pass);
|
||||
|
||||
conn_set_user(conn, user);
|
||||
conn_set_owner(conn, user);
|
||||
|
|
Loading…
Reference in a new issue