]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/VfrCompile/Pccts: Add virtual destructor for class DLGInputStream
authorHao Wu <hao.a.wu@intel.com>
Mon, 10 Oct 2016 12:40:38 +0000 (20:40 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 8 Nov 2016 08:38:27 +0000 (16:38 +0800)
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>
BaseTools/Source/C/VfrCompile/Pccts/h/DLexerBase.h

index 667ecfd81aa50b17b29699ef6acf9682830bd2dc..b9ca311baa461aefcb467fe1b593b03a1ee28edf 100644 (file)
@@ -57,6 +57,7 @@ public:
 class DllExportPCCTS DLGInputStream {\r
 public:\r
        virtual int nextChar() = 0;\r
 class DllExportPCCTS DLGInputStream {\r
 public:\r
        virtual int nextChar() = 0;\r
+    virtual ~DLGInputStream() {};\r
 };\r
 \r
 /* Predefined char stream: Input from FILE */\r
 };\r
 \r
 /* Predefined char stream: Input from FILE */\r