Does this leak the reference if name != urandom_engine_name then? try/finally might be better for managing resources?