[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - cli_ure/source

Julien Nabet serval2412 at yahoo.fr
Tue Apr 29 03:41:03 PDT 2014


 cli_ure/source/native/native_bootstrap.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8f28c7d373288a136b85aa70323c3fa2cf4680cb
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Apr 29 10:14:12 2014 +0200

    Fix memory leaks
    
    Change-Id: Id67d5375bedc6e6c10082d9c5ee69d6e932be158
    Reviewed-on: https://gerrit.libreoffice.org/9194
    Tested-by: David Tardon <dtardon at redhat.com>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/cli_ure/source/native/native_bootstrap.cxx b/cli_ure/source/native/native_bootstrap.cxx
index 0a22d7b..d8ba402 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;
             }
         }


More information about the Libreoffice-commits mailing list