Issue #21310: Fixed possible resource leak in failed open().