free_trusted_setup should also free `s`
asn-d6 opened this issue · comments
George Kadianakis commented
Is there a reason we are not also freeing the pointer s
in free_trusted_setup()
and the bindings need to do it themselves?
Ramana Kumar commented
We don't allocate that pointer, so it would be "rude" to free it. It's just a convention where whoever allocates a pointer is responsible for freeing it.
George Kadianakis commented
I see. That's because load_trusted_setup()
takes the pointer as input instead of producing it itself.
Makes sense. Let's close this for now. Thanks!
George Kadianakis commented
We should check that all bindings free the pointer correctly since it's a bit counter-intuitive.