Fixing server memory leak after sending wrong key by the client.
Merge pull request #1547 from pasinskim/server_mem_leak

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