[entropy.tools] apply_entropy_delta: avoid potential fd leaks