Skip to content

Commit 2270d32

Browse files
author
git apple-llvm automerger
committed
Merge commit 'c1f793618461' from swift/release/6.1 into stable/20240723
2 parents cbc65ce + c1f7936 commit 2270d32

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,12 +636,15 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) {
636636
if (!dyld_process)
637637
return false;
638638

639+
auto cleanup_process_on_exit =
640+
llvm::make_scope_exit([&]() { dyld_process_dispose(dyld_process); });
641+
639642
dyld_process_snapshot_t snapshot =
640643
dyld_process_snapshot_create_for_process(dyld_process, nullptr);
641644
if (!snapshot)
642645
return false;
643646

644-
auto on_exit =
647+
auto cleanup_snapshot_on_exit =
645648
llvm::make_scope_exit([&]() { dyld_process_snapshot_dispose(snapshot); });
646649

647650
dyld_shared_cache_t shared_cache =

0 commit comments

Comments
 (0)