From bcabad06206db0cac12a2ec758c5b428a8757a1c Mon Sep 17 00:00:00 2001 From: localhorst Date: Sun, 7 Dec 2025 18:48:38 +0100 Subject: [PATCH] Unchecked popen/pclose Return Values --- src/reHDD.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/reHDD.cpp b/src/reHDD.cpp index 8083925..38850e8 100644 --- a/src/reHDD.cpp +++ b/src/reHDD.cpp @@ -405,6 +405,7 @@ void reHDD::filterIgnoredDrives(list *plistDrives) FILE *outputfileBlkid = popen(sCMD.c_str(), "r"); // get UUID from drive if (outputfileBlkid == NULL) { + pclose(outputfileBlkid); exit(EXIT_FAILURE); } @@ -684,6 +685,7 @@ bool reHDD::getSystemDrive(string &systemDrive) if (outputfileHwinfo == NULL) { Logger::logThis()->error("Unable to scan attached drives for system drive"); + pclose(outputfileHwinfo); exit(EXIT_FAILURE); }