diff --git a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc index fb7f163787..8ae2ead4ef 100644 --- a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc @@ -544,6 +544,9 @@ class Trust_anchor void _close_handle(Vfs::Vfs_handle **handle) { + if (*handle == nullptr) + return; + (*handle)->close(); (*handle) = nullptr; }