There's nothing wrong with goto.  In this case, I'm using it as a lightweight try-finally mechanism (something C++ doesn't support directly).