Free session on error