David Hedberg : shell32: Fix possible memory leak in CreateUnixFolder.
Alexandre Julliard
julliard at winehq.org
Tue Jun 1 12:12:42 CDT 2010
Module: wine
Branch: master
Commit: c1682eb8eb42fa54c8f4c7860acef10de4eaa474
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c1682eb8eb42fa54c8f4c7860acef10de4eaa474
Author: David Hedberg <david.hedberg at gmail.com>
Date: Tue Jun 1 04:46:44 2010 +0200
shell32: Fix possible memory leak in CreateUnixFolder.
---
dlls/shell32/shfldr_unixfs.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index 2951d6a..dfd7255 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -2158,13 +2158,15 @@ static const IDropTargetVtbl UnixFolder_IDropTarget_Vtbl = {
static HRESULT CreateUnixFolder(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, const CLSID *pCLSID)
{
HRESULT hr = E_FAIL;
- UnixFolder *pUnixFolder = SHAlloc((ULONG)sizeof(UnixFolder));
+ UnixFolder *pUnixFolder;
if (pUnkOuter) {
FIXME("Aggregation not yet implemented!\n");
return CLASS_E_NOAGGREGATION;
}
+ pUnixFolder = SHAlloc((ULONG)sizeof(UnixFolder));
+
if(pUnixFolder) {
pUnixFolder->lpIShellFolder2Vtbl = &UnixFolder_IShellFolder2_Vtbl;
pUnixFolder->lpIPersistFolder3Vtbl = &UnixFolder_IPersistFolder3_Vtbl;
More information about the wine-cvs
mailing list