Fix memory leak on client session timeout.