summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/unzipfile.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-12-16 23:26:33 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-12-16 23:26:33 +0000
commit7a7ea114fbaa76d56db4818ec84e21d564a4b412 (patch)
treebd6692ffaf4c367dff6b8f9985b85f3f43a1750a /plugins/PluginUpdater/src/unzipfile.cpp
parentc7b7307fff2c3b3b01517018c65c7af82e7cd3aa (diff)
PluginUpdater:
-Fixed memory leak git-svn-id: http://svn.miranda-ng.org/main/trunk@11481 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/unzipfile.cpp')
-rw-r--r--plugins/PluginUpdater/src/unzipfile.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/PluginUpdater/src/unzipfile.cpp b/plugins/PluginUpdater/src/unzipfile.cpp
index 17282cba41..2f0e5872c4 100644
--- a/plugins/PluginUpdater/src/unzipfile.cpp
+++ b/plugins/PluginUpdater/src/unzipfile.cpp
@@ -63,8 +63,10 @@ bool extractCurrentFile(unzFile uf, TCHAR *ptszDestPath, TCHAR *ptszBackPath, bo
if (!(file_info.external_fa & FILE_ATTRIBUTE_DIRECTORY)) {
err = unzOpenCurrentFile(uf);
- if (err != UNZ_OK)
+ if (err != UNZ_OK) {
+ mir_free(ptszNewName);
return false;
+ }
if (ptszBackPath != NULL) {
PrepareFileName(tszDestFile, SIZEOF(tszDestFile), ptszDestPath, ptszNewName);