diff options
author | Armada <jules.blok@gmail.com> | 2013-02-10 03:00:50 +0400 |
---|---|---|
committer | Armada <jules.blok@gmail.com> | 2013-02-11 01:04:38 +0400 |
commit | 18b5ca03352e0fd92f6b45040d50ffe28f7105b0 (patch) | |
tree | 9c4952574f5aa53bcd14fd35adc412be833f3014 | |
parent | e2991a1f0b146f98ad3d2e846fd55f1ba7547f12 (diff) |
Fixed file list memory leaks.
-rw-r--r-- | RFS.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) |