From c8a687950fdf7cca8f6a590e86a0722190527811 Mon Sep 17 00:00:00 2001 From: Maschell Date: Tue, 2 Aug 2022 10:15:05 +0200 Subject: [PATCH] Close raw odd handle in GMPartitionsState constructor --- source/GMPartitionsDumperState.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/GMPartitionsDumperState.cpp b/source/GMPartitionsDumperState.cpp index 162647b..7e8a14f 100644 --- a/source/GMPartitionsDumperState.cpp +++ b/source/GMPartitionsDumperState.cpp @@ -36,6 +36,10 @@ GMPartitionsDumperState::GMPartitionsDumperState(eDumpTarget pTargetDevice) : ta } GMPartitionsDumperState::~GMPartitionsDumperState() { + if (this->oddFd != -1) { + FSAEx_RawClose(__wut_devoptab_fs_client, this->oddFd); + this->oddFd = -1; + } free(this->sectorBuf); this->sectorBuf = nullptr; free(this->readBuffer);