Hi,
Yes it is a bug in the C implementation that is not cleaning up properly when error are raised.
Could you open an issue on github to track this and say that this 43 operation is not cleaned up when error are raised please.
Thanks for the report !