diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-04-29 10:14:12 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-04-29 10:40:38 +0000 |
commit | 8f28c7d373288a136b85aa70323c3fa2cf4680cb (patch) | |
tree | 57e81af3acef787268d259a8f179439ff8e93bc9 /cli_ure | |
parent | 456b64a1080b4cc88147174ccb85185bedfe3516 (diff) |
Fix memory leaks
Change-Id: Id67d5375bedc6e6c10082d9c5ee69d6e932be158
Reviewed-on: https://gerrit.libreoffice.org/9194
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'cli_ure')
-rw-r--r-- | cli_ure/source/native/native_bootstrap.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cli_ure/source/native/native_bootstrap.cxx b/cli_ure/source/native/native_bootstrap.cxx index 0a22d7bb5e63..d8ba40239d06 100644 --- a/cli_ure/source/native/native_bootstrap.cxx +++ b/cli_ure/source/native/native_bootstrap.cxx @@ -93,6 +93,7 @@ WCHAR* getPathFromRegistryKey( HKEY hroot, LPCWSTR subKeyName ) if ( RegQueryValueEx( hkey, NULL, NULL, &type, (LPBYTE) data, &size ) != ERROR_SUCCESS ) { RegCloseKey( hkey ); + delete[] data; return NULL; } @@ -287,6 +288,7 @@ extern "C" FARPROC WINAPI delayLoadHook( szLibName = new WCHAR[size]; if (! MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, pdli->szDll, -1, szLibName, size)) { + delete[] szLibName; return 0; } } |