Fixing server memory leak after sending wrong key by the client.