I am not really sure whether the new code is correct.
But I am confident that previous code does nothing except leak.