diff options
author | Robert Griebl <robert.griebl@qt.io> | 2024-03-06 00:41:59 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@qt.io> | 2024-03-07 11:25:16 +0000 |
commit | c92765fed579b7239d4292cafda9ec3a2c10eb37 (patch) | |
tree | 2d50f5c6b55b7bc491da0f6befaceadae68c1124 | |
parent | 0cdaac7d353e938c5f0b1cc452e82e59dee0e438 (diff) |
Fix memory leak due to broken unique_ptr deleter
Change-Id: Ibff2b6f062c829bc40446337412af37103cf8631
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
(cherry picked from commit 8657849f1349654311179ab042eb8992622e8c19)
-rw-r--r-- | src/main-lib/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main-lib/main.cpp b/src/main-lib/main.cpp index a5182980..e289de6e 100644 --- a/src/main-lib/main.cpp +++ b/src/main-lib/main.cpp @@ -747,7 +747,7 @@ void Main::createInstanceInfoFile(const QString &instanceId) noexcept(false) QString filePattern = (instanceId.isEmpty() ? defaultInstanceId : instanceId) + u"-%1"; static std::unique_ptr<QLockFile> lockf; - static std::unique_ptr<QFile, void (*)(QFile *)> infof(nullptr, [](QFile *f) { f->remove(); }); + static std::unique_ptr<QFile, void (*)(QFile *)> infof(nullptr, [](QFile *f) { f->remove(); delete f; }); for (int i = 0; i < 32; ++i) { // Wayland sockets are limited to 32 instances as well QString tryPattern = filePattern.arg(i); |