about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--010vm.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/010vm.cc b/010vm.cc
index 873370b1..c1cec406 100644
--- a/010vm.cc
+++ b/010vm.cc
@@ -375,7 +375,9 @@ type_tree& type_tree::operator=(const type_tree& original) {
   atom = original.atom;
   name = original.name;
   value = original.value;
+  if (left) delete left;
   left = original.left ? new type_tree(*original.left) : NULL;
+  if (right) delete right;
   right = original.right ? new type_tree(*original.right) : NULL;
   return *this;
 }