diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-11-23 17:39:22 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-11-23 17:39:22 +0100 |
commit | 6eb24b9220a7a5653405b09b0eb130a84b310020 (patch) | |
tree | 24e73a0ea871b659b8a10c4a1d99ca1efee20c1d /xmerge | |
parent | e5bbf7a28b93ed84d0ab99219ba04cb74046c236 (diff) | |
parent | 3415c114d2aa193052fcc7081d82965f1d9f9e5b (diff) |
merge commit for m65
Diffstat (limited to 'xmerge')
-rw-r--r-- | xmerge/source/activesync/XMergeFilter.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xmerge/source/activesync/XMergeFilter.cpp b/xmerge/source/activesync/XMergeFilter.cpp index ce1bc61cc58e..a02f11d03ad3 100644 --- a/xmerge/source/activesync/XMergeFilter.cpp +++ b/xmerge/source/activesync/XMergeFilter.cpp @@ -343,11 +343,6 @@ TCHAR* CXMergeFilter::GetJavaBaseDir() DWORD dwClassName = _MAX_PATH; DWORD dwKeyName = _MAX_PATH; - // Locations shouldn't be greater than _MAX_PATH - TCHAR* szJavaHome = new TCHAR[_MAX_PATH + 1]; - DWORD dwSize = _MAX_PATH + 1; - - /* * Java leaves registry keys at HKLM\SOFTWARE\JavaSoft. * @@ -357,6 +352,10 @@ TCHAR* CXMergeFilter::GetJavaBaseDir() if (lRet != ERROR_SUCCESS) return NULL; + // Locations shouldn't be greater than _MAX_PATH + TCHAR* szJavaHome = new TCHAR[_MAX_PATH + 1]; + DWORD dwSize = _MAX_PATH + 1; + /* use current version */ lRet = ::RegQueryValueEx(hKey, _T("CurrentVersion"), 0, NULL, (LPBYTE)szCurrentJava, &dwSize); @@ -376,6 +375,7 @@ TCHAR* CXMergeFilter::GetJavaBaseDir() if (lRet != ERROR_SUCCESS) { RegCloseKey(hKey); + delete [] szJavaHome; return NULL; } @@ -387,7 +387,7 @@ TCHAR* CXMergeFilter::GetJavaBaseDir() { RegCloseKey(hDataKey); RegCloseKey(hKey); - delete szJavaHome; + delete [] szJavaHome; return NULL; } @@ -400,7 +400,7 @@ TCHAR* CXMergeFilter::GetJavaBaseDir() if (((dwAttrs & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) || dwAttrs == INVALID_FILE_SIZE) { - delete szJavaHome; + delete [] szJavaHome; return NULL; } |