Code

Fix memory leak in helper method for disconnect