summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/VfrCompile/Pccts
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-10-10 20:40:38 +0800
committerHao Wu <hao.a.wu@intel.com>2016-11-08 16:38:27 +0800
commitd55638362727fd03d0ad97f9fe937984f9456e1b (patch)
tree84b794a559ec2c1199ec2748a314c7b9a159618c /BaseTools/Source/C/VfrCompile/Pccts
parentaeadb1c453174d543ad95d2a601e229506b2679e (diff)
downloadedk2-d55638362727fd03d0ad97f9fe937984f9456e1b.zip
edk2-d55638362727fd03d0ad97f9fe937984f9456e1b.tar.gz
edk2-d55638362727fd03d0ad97f9fe937984f9456e1b.tar.bz2
BaseTools/VfrCompile/Pccts: Add virtual destructor for class DLGInputStream
Class DLGInputStream defined in DLexerBase.h has a virtual method but no virtual destructor. This commit add an empty virtual destructor to avoid potential memory/resource leak when an object of a class derived from class DLGInputStream is deleted through a pointer to the DLGInputStream class. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/C/VfrCompile/Pccts')
-rw-r--r--BaseTools/Source/C/VfrCompile/Pccts/h/DLexerBase.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/h/DLexerBase.h b/BaseTools/Source/C/VfrCompile/Pccts/h/DLexerBase.h
index 667ecfd..b9ca311 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/h/DLexerBase.h
+++ b/BaseTools/Source/C/VfrCompile/Pccts/h/DLexerBase.h
@@ -57,6 +57,7 @@ public:
class DllExportPCCTS DLGInputStream {
public:
virtual int nextChar() = 0;
+ virtual ~DLGInputStream() {};
};
/* Predefined char stream: Input from FILE */