From e8a47bd3da2ece5f47c6ce6b143dcc04892647d8 Mon Sep 17 00:00:00 2001 From: "Samuel D. Crow" Date: Wed, 21 Apr 2021 21:54:08 -0500 Subject: [PATCH] Cleared up double-free of a temporary variable. --- yab2cpp.h | 3 ++- yabDataStructures.cpp | 8 -------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/yab2cpp.h b/yab2cpp.h index 1db2394..8c66326 100644 --- a/yab2cpp.h +++ b/yab2cpp.h @@ -244,7 +244,8 @@ public: /* Terminal expression node */ expression(operands *x); - virtual ~expression(); + virtual ~expression() + {}; }; /* parent class of all code types */ diff --git a/yabDataStructures.cpp b/yabDataStructures.cpp index 455aa14..dbe7a8c 100644 --- a/yabDataStructures.cpp +++ b/yabDataStructures.cpp @@ -466,14 +466,6 @@ operands *expression::evaluate() return this->op; } -expression::~expression() -{ - if(this->getOp()==O_TERM) - { - op->dispose(); - } -} - /* variable definitions */ variableType::variableType(enum SCOPES s, string &name, enum TYPES t, fn *fnHandle):operands(t) {