diff options
-rw-r--r-- | plugins/PluginUpdater/src/unzipfile.cpp | 4 |
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);
|