CURL sessions are discarded correctly even if an exception is thrown.