From 058d3b82677eabe88612ce9e86ea92f6f91f1410 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Fri, 10 Apr 2015 14:37:49 +0200 Subject: [PATCH] BPathFinder: Fix leak of paths from find_paths. --- src/kits/storage/PathFinder.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kits/storage/PathFinder.cpp b/src/kits/storage/PathFinder.cpp index fe3b1c5567..89b9de1d62 100644 --- a/src/kits/storage/PathFinder.cpp +++ b/src/kits/storage/PathFinder.cpp @@ -6,6 +6,7 @@ #include +#include #include #include #include @@ -128,6 +129,8 @@ BPathFinder::FindPaths(const char* architecture, if (error != B_OK) return error; + MemoryDeleter pathArrayDeleter(pathArray); + // add them to BStringList for (size_t i = 0; i < pathCount; i++) { BString path(pathArray[i]);