From 4689d9b107a2ee36d3c3af0b18eb255bdab57279 Mon Sep 17 00:00:00 2001 From: system64fumo Date: Thu, 22 Aug 2024 16:18:37 +0300 Subject: [PATCH] Cleanup --- src/debug/HyprCtl.cpp | 3 ++- src/helpers/MiscFunctions.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 881d36d9..21232a96 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -939,7 +939,8 @@ std::string systemInfoRequest(eHyprCtlOutputFormat format, std::string request) GPUINFO += "Driver Description: " + description + "\n"; result += GPUINFO; - + drmFreeVersion(version); + close(fd); if (GPUINFO.contains("NVIDIA") && std::filesystem::exists("/proc/driver/nvidia/version")) result += execAndGet("cat /proc/driver/nvidia/version | grep NVRM"); diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index a7d9f33d..a4dfcc0a 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -627,6 +627,8 @@ void logSystemInfo() { GPUINFO += "Driver Description: " + description + "\n"; Debug::log(LOG, "GPU information:\n{}\n", GPUINFO); + drmFreeVersion(version); + close(fd); if (GPUINFO.contains("NVIDIA")) { Debug::log(WARN, "Warning: you're using an NVIDIA GPU. Make sure you follow the instructions on the wiki if anything is amiss.\n");