summaryrefslogtreecommitdiffstats
path: root/src/include/util
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2012-08-24 18:19:24 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-09-04 17:02:04 -0500
commit2e8754b467914eb554a886317b88a3a654e0f58d (patch)
treeada81fe9f37f3375a604829ab3d7eacde19c930a /src/include/util
parent0c1b5c905ee077e232924f7541df73f4d2e6c862 (diff)
downloadtalos-hostboot-2e8754b467914eb554a886317b88a3a654e0f58d.tar.gz
talos-hostboot-2e8754b467914eb554a886317b88a3a654e0f58d.zip
Memory leak in splaytree and testcase.
Change-Id: I15515e3f63c8c24dc79da760b47411bf7ca6577a Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1579 Tested-by: Jenkins Server Reviewed-by: Terry J. Opie <opiet@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/util')
-rw-r--r--src/include/util/impl/splaytree.H55
1 files changed, 32 insertions, 23 deletions
diff --git a/src/include/util/impl/splaytree.H b/src/include/util/impl/splaytree.H
index 9159ddddc..8b3743b50 100644
--- a/src/include/util/impl/splaytree.H
+++ b/src/include/util/impl/splaytree.H
@@ -1,26 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/util/impl/splaytree.h $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2012
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
-
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/util/impl/splaytree.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
#ifndef __UTIL_IMPL_SPLAYTREE_H
#define __UTIL_IMPL_SPLAYTREE_H
@@ -104,6 +104,15 @@ namespace Util
new (&data_T()) T();
};
+ /** Default destructor.
+ *
+ * Call destructor on the child object.
+ */
+ ~Node()
+ {
+ data_T().~T();
+ }
+
/** Copy constructor from a Node.
*
* Initializes the node-links and copies the data storage area
OpenPOWER on IntegriCloud