[rtems-tools commit] rtk: Fix buffer leak in rld::path::abs_path.

Chris Johns chrisj at rtems.org
Sat Sep 13 02:11:50 UTC 2014


Module:    rtems-tools
Branch:    master
Commit:    73eb48a0459658b7d031e9e0692016b937a44881
Changeset: http://git.rtems.org/rtems-tools/commit/?id=73eb48a0459658b7d031e9e0692016b937a44881

Author:    Chris Johns <chrisj at rtems.org>
Date:      Sat Sep 13 12:20:19 2014 +1000

rtk: Fix buffer leak in rld::path::abs_path.

---

 rtemstoolkit/rld-path.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/rtemstoolkit/rld-path.cpp b/rtemstoolkit/rld-path.cpp
index 1cdb586..1410cf8 100644
--- a/rtemstoolkit/rld-path.cpp
+++ b/rtemstoolkit/rld-path.cpp
@@ -116,6 +116,7 @@ namespace rld
           if (!::getcwd (buf, 132 * 1024))
             throw rld::error (::strerror (errno), "get current working directory");
           path_join (buf, path, apath);
+          delete [] buf;
         }
         catch (...)
         {



More information about the vc mailing list