summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/source/win32/zipfile/zipfile.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx
index ac9f9a0cec30..a7708dcfb391 100644
--- a/shell/source/win32/zipfile/zipfile.cxx
+++ b/shell/source/win32/zipfile/zipfile.cxx
@@ -136,7 +136,10 @@ static std::string readString(StreamInterface *stream, unsigned long size)
unsigned char *tmp = new unsigned char[size];
unsigned long numBytesRead = stream->sread(tmp, size);
if (numBytesRead != size)
+ {
+ delete [] tmp;
throw IOException(-1);
+ }
std::string aStr((char *)tmp, size);
delete [] tmp;