Can you test this?

I was getting compile errors on the latest version of node. I am not a c++ guy so I may have done this completely wrong.

It also looks like the context is not freed if there is an error.