Skip to content

Commit cbd954c

Browse files
committed
[WARP] Fix leaking binary view on empty views
Can be triggered by trying to run the processor on a file with no functions. Found this while doing misc performance testing on windows.
1 parent 269a584 commit cbd954c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugins/warp/src/processor.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@ impl WarpFileProcessor {
664664
if view.functions().is_empty() {
665665
self.state
666666
.set_file_state(path.clone(), ProcessingFileState::Processed);
667+
// Close the view manually, see comment in [`BinaryView`].
668+
view.file().close();
667669
return Err(ProcessingError::SkippedFile(path));
668670
}
669671

0 commit comments

Comments
 (0)