Don't touch the This pointer after it has been freed.

This commit is contained in:
Alberto Massari 2002-10-25 21:01:29 +00:00 committed by Alexandre Julliard
parent 0c32905ccc
commit 1a7a947314
3 changed files with 9 additions and 6 deletions

View File

@ -122,8 +122,9 @@ static ULONG WINAPI IDropTargetHelper_fnRelease (IDropTargetHelper * iface)
TRACE ("(%p)->(count=%lu)\n", This, This->ref);
if (!--(This->ref)) {
TRACE ("-- destroying (%p)\n", This);
LocalFree ((HLOCAL) This);
TRACE("-- destroying (%p)\n", This);
LocalFree ((HLOCAL) This);
return 0;
}
return This->ref;
}

View File

@ -172,6 +172,7 @@ static ULONG WINAPI ISF_Desktop_fnRelease (IShellFolder2 * iface)
if (This->sPathTarget)
SHFree (This->sPathTarget);
LocalFree ((HLOCAL) This);
return 0;
}
return This->ref;
}

View File

@ -173,10 +173,11 @@ static ULONG WINAPI ISF_MyComputer_fnRelease (IShellFolder2 * iface)
TRACE ("(%p)->(count=%lu)\n", This, This->ref);
if (!--(This->ref)) {
TRACE ("-- destroying IShellFolder(%p)\n", This);
if (This->pidlRoot)
SHFree (This->pidlRoot);
LocalFree ((HLOCAL) This);
TRACE ("-- destroying IShellFolder(%p)\n", This);
if (This->pidlRoot)
SHFree (This->pidlRoot);
LocalFree ((HLOCAL) This);
return 0;
}
return This->ref;
}