diff options
author | Pierre Ossman <ossman@cendio.se> | 2023-01-15 14:00:12 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2023-02-04 14:03:13 +0100 |
commit | 15a393912673e2ae65b9b3a28f9b82f967c49f98 (patch) | |
tree | f74735c6a099081bdae872ea5203ee13decba5a8 /win/rfb_win32/Win32Util.cxx | |
parent | 19badc4def7d2bee677da3a02e1117f1e051a8cd (diff) | |
download | tigervnc-15a393912673e2ae65b9b3a28f9b82f967c49f98.tar.gz tigervnc-15a393912673e2ae65b9b3a28f9b82f967c49f98.zip |
Free char buffer directly
It's extreme overkill to inherit from CharArray just to get the
automatic freeing of the buffer when the object is destroyed.
Diffstat (limited to 'win/rfb_win32/Win32Util.cxx')
-rw-r--r-- | win/rfb_win32/Win32Util.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/win/rfb_win32/Win32Util.cxx b/win/rfb_win32/Win32Util.cxx index ad301574..e806b1db 100644 --- a/win/rfb_win32/Win32Util.cxx +++ b/win/rfb_win32/Win32Util.cxx @@ -28,6 +28,7 @@ #include <rfb_win32/Handle.h> #include <rdr/HexOutStream.h> #include <rdr/Exception.h> +#include <rfb/util.h> #include <stdio.h> namespace rfb { @@ -60,6 +61,10 @@ FileVersionInfo::FileVersionInfo(const char* filename) { throw rdr::SystemException("GetVersionInfo failed", GetLastError()); } +FileVersionInfo::~FileVersionInfo() { + delete [] buf; +} + const char* FileVersionInfo::getVerString(const char* name, DWORD langId) { uint8_t langIdBuf[sizeof(langId)]; for (int i=sizeof(langIdBuf)-1; i>=0; i--) { |