Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/rarfilesource.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmada <jules.blok@gmail.com>2013-02-10 03:00:50 +0400
committerArmada <jules.blok@gmail.com>2013-02-11 01:04:38 +0400
commit18b5ca03352e0fd92f6b45040d50ffe28f7105b0 (patch)
tree9c4952574f5aa53bcd14fd35adc412be833f3014
parente2991a1f0b146f98ad3d2e846fd55f1ba7547f12 (diff)
Fixed file list memory leaks.
-rw-r--r--RFS.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/RFS.cpp b/RFS.cpp
index dd3718e..311ac1c 100644
--- a/RFS.cpp
+++ b/RFS.cpp
@@ -803,6 +803,7 @@ STDMETHODIMP CRARFileSource::Load (LPCOLESTR lpwszFileName, const AM_MEDIA_TYPE
if (!num_ok_files)
{
+ file_list.Clear ();
return E_UNEXPECTED; // TODO: Figure out a better error code.
}
@@ -818,7 +819,10 @@ STDMETHODIMP CRARFileSource::Load (LPCOLESTR lpwszFileName, const AM_MEDIA_TYPE
m_file = (CRFSFile *) DialogBoxParam (g_hInst, MAKEINTRESOURCE(IDD_FILELIST), 0, DlgFileList, (LPARAM) &file_list);
if (!m_file)
+ {
+ file_list.Clear ();
return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
+ }
}
if (pmt)