diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index 2f3912370..ca6a0fe71 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -1357,7 +1357,7 @@ void MySQL_Session::handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_C client_myds->myprot.generate_pkt_OK(true,NULL,NULL,1,0,0,0,0,NULL); client_myds->DSS=STATE_SLEEP; status=WAITING_CLIENT_DATA; - wrong_pass=false; + *wrong_pass=false; } else { l_free(pkt->size,pkt->ptr); proxy_debug(PROXY_DEBUG_MYSQL_CONNECTION, 5, "Wrong credentials for frontend: disconnecting\n"); diff --git a/lib/Standard_MySQL_Authentication.cpp b/lib/Standard_MySQL_Authentication.cpp index c29493dea..299d37df2 100644 --- a/lib/Standard_MySQL_Authentication.cpp +++ b/lib/Standard_MySQL_Authentication.cpp @@ -137,11 +137,10 @@ class Standard_MySQL_Authentication: public MySQL_Authentication { virtual char * lookup(char * username, enum cred_username_type usertype, bool *use_ssl, int *default_hostgroup, bool *transaction_persistent) { char *ret=NULL; uint64_t hash1, hash2; - SpookyHash *myhash=new SpookyHash(); - myhash->Init(1,2); - myhash->Update(username,strlen(username)); - myhash->Final(&hash1,&hash2); - delete myhash; + SpookyHash myhash; + myhash.Init(1,2); + myhash.Update(username,strlen(username)); + myhash.Final(&hash1,&hash2); creds_group_t &cg=(usertype==USERNAME_BACKEND ? creds_backends : creds_frontends);