janitorial: Remove redundant NULL pointer checks before HeapFree'ing them.
Some HeapFree's are hidden behind macros. Found by smatch.
This commit is contained in:
parent
9d4960bfcb
commit
a87520036f
27 changed files with 46 additions and 92 deletions
|
@ -1455,7 +1455,7 @@ LONG WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue,
|
||||||
(dwType == REG_EXPAND_SZ && !(dwFlags & RRF_NOEXPAND)))
|
(dwType == REG_EXPAND_SZ && !(dwFlags & RRF_NOEXPAND)))
|
||||||
{
|
{
|
||||||
do {
|
do {
|
||||||
if (pvBuf) HeapFree(GetProcessHeap(), 0, pvBuf);
|
HeapFree(GetProcessHeap(), 0, pvBuf);
|
||||||
|
|
||||||
pvBuf = HeapAlloc(GetProcessHeap(), 0, cbData);
|
pvBuf = HeapAlloc(GetProcessHeap(), 0, cbData);
|
||||||
if (!pvBuf)
|
if (!pvBuf)
|
||||||
|
@ -1494,7 +1494,7 @@ LONG WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue,
|
||||||
CopyMemory(pvData, pvBuf, *pcbData);
|
CopyMemory(pvData, pvBuf, *pcbData);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pvBuf) HeapFree(GetProcessHeap(), 0, pvBuf);
|
HeapFree(GetProcessHeap(), 0, pvBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pszSubKey && pszSubKey[0])
|
if (pszSubKey && pszSubKey[0])
|
||||||
|
@ -1547,7 +1547,7 @@ LONG WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue,
|
||||||
(dwType == REG_EXPAND_SZ && !(dwFlags & RRF_NOEXPAND)))
|
(dwType == REG_EXPAND_SZ && !(dwFlags & RRF_NOEXPAND)))
|
||||||
{
|
{
|
||||||
do {
|
do {
|
||||||
if (pvBuf) HeapFree(GetProcessHeap(), 0, pvBuf);
|
HeapFree(GetProcessHeap(), 0, pvBuf);
|
||||||
|
|
||||||
pvBuf = HeapAlloc(GetProcessHeap(), 0, cbData);
|
pvBuf = HeapAlloc(GetProcessHeap(), 0, cbData);
|
||||||
if (!pvBuf)
|
if (!pvBuf)
|
||||||
|
@ -1586,7 +1586,7 @@ LONG WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue,
|
||||||
CopyMemory(pvData, pvBuf, *pcbData);
|
CopyMemory(pvData, pvBuf, *pcbData);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pvBuf) HeapFree(GetProcessHeap(), 0, pvBuf);
|
HeapFree(GetProcessHeap(), 0, pvBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pszSubKey && pszSubKey[0])
|
if (pszSubKey && pszSubKey[0])
|
||||||
|
|
|
@ -1841,8 +1841,6 @@ LookupAccountNameA(
|
||||||
|
|
||||||
RtlFreeUnicodeString(&lpSystemW);
|
RtlFreeUnicodeString(&lpSystemW);
|
||||||
RtlFreeUnicodeString(&lpAccountW);
|
RtlFreeUnicodeString(&lpAccountW);
|
||||||
|
|
||||||
if (lpReferencedDomainNameW)
|
|
||||||
HeapFree(GetProcessHeap(), 0, lpReferencedDomainNameW);
|
HeapFree(GetProcessHeap(), 0, lpReferencedDomainNameW);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -1284,9 +1284,7 @@ static BOOL AVISaveOptionsFmtChoose(HWND hWnd)
|
||||||
if (ret == S_OK)
|
if (ret == S_OK)
|
||||||
pOptions->dwFlags |= AVICOMPRESSF_VALID;
|
pOptions->dwFlags |= AVICOMPRESSF_VALID;
|
||||||
|
|
||||||
if (afmtc.pwfxEnum != NULL)
|
|
||||||
HeapFree(GetProcessHeap(), 0, afmtc.pwfxEnum);
|
HeapFree(GetProcessHeap(), 0, afmtc.pwfxEnum);
|
||||||
|
|
||||||
return (ret == S_OK ? TRUE : FALSE);
|
return (ret == S_OK ? TRUE : FALSE);
|
||||||
} else {
|
} else {
|
||||||
ERR(": unknown streamtype 0x%08lX\n", sInfo.fccType);
|
ERR(": unknown streamtype 0x%08lX\n", sInfo.fccType);
|
||||||
|
@ -2007,7 +2005,6 @@ HRESULT WINAPI AVISaveVW(LPCWSTR szFile, CLSID *pclsidHandler,
|
||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (lpBuffer != NULL)
|
|
||||||
HeapFree(GetProcessHeap(), 0, lpBuffer);
|
HeapFree(GetProcessHeap(), 0, lpBuffer);
|
||||||
if (pfile != NULL) {
|
if (pfile != NULL) {
|
||||||
for (curStream = 0; curStream < nStreams; curStream++) {
|
for (curStream = 0; curStream < nStreams; curStream++) {
|
||||||
|
|
|
@ -1964,7 +1964,6 @@ static HRESULT AVIFILE_LoadIndex(IAVIFileImpl *This, DWORD size, DWORD offset)
|
||||||
pos, &bAbsolute);
|
pos, &bAbsolute);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lp != NULL)
|
|
||||||
HeapFree(GetProcessHeap(), 0, lp);
|
HeapFree(GetProcessHeap(), 0, lp);
|
||||||
|
|
||||||
/* checking ... */
|
/* checking ... */
|
||||||
|
|
|
@ -340,7 +340,6 @@ static BOOL AVIFILE_FormatsEqual(PAVISTREAM avi1, PAVISTREAM avi2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fmt2 != NULL)
|
|
||||||
HeapFree(GetProcessHeap(), 0, fmt2);
|
HeapFree(GetProcessHeap(), 0, fmt2);
|
||||||
HeapFree(GetProcessHeap(), 0, fmt1);
|
HeapFree(GetProcessHeap(), 0, fmt1);
|
||||||
|
|
||||||
|
|
|
@ -3821,7 +3821,7 @@ static void d3ddevice_lock_update(IDirectDrawSurfaceImpl* This, LPCRECT pRect, D
|
||||||
buffer_color, buffer_format, dst);
|
buffer_color, buffer_format, dst);
|
||||||
|
|
||||||
if (current_width > buffer_width) {
|
if (current_width > buffer_width) {
|
||||||
if (buffer != NULL) HeapFree(GetProcessHeap(), 0, buffer);
|
HeapFree(GetProcessHeap(), 0, buffer);
|
||||||
buffer_width = current_width;
|
buffer_width = current_width;
|
||||||
buffer = HeapAlloc(GetProcessHeap(), 0, buffer_width);
|
buffer = HeapAlloc(GetProcessHeap(), 0, buffer_width);
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ static void Main_DirectDrawSurface_Destroy(IDirectDrawSurfaceImpl* This)
|
||||||
}
|
}
|
||||||
This->final_release(This);
|
This->final_release(This);
|
||||||
if (This->private != This+1) HeapFree(GetProcessHeap(), 0, This->private);
|
if (This->private != This+1) HeapFree(GetProcessHeap(), 0, This->private);
|
||||||
if (This->tex_private) HeapFree(GetProcessHeap(), 0, This->tex_private);
|
HeapFree(GetProcessHeap(), 0, This->tex_private);
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -755,7 +755,6 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = ERROR_OUTOFMEMORY;
|
ret = ERROR_OUTOFMEMORY;
|
||||||
if (ipAddrTable)
|
|
||||||
HeapFree(GetProcessHeap(), 0, ipAddrTable);
|
HeapFree(GetProcessHeap(), 0, ipAddrTable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -635,7 +635,7 @@ static void MSACM_ReorderDriversByPriority(void)
|
||||||
|
|
||||||
errCleanUp:
|
errCleanUp:
|
||||||
if (hPriorityKey != NULL) RegCloseKey(hPriorityKey);
|
if (hPriorityKey != NULL) RegCloseKey(hPriorityKey);
|
||||||
if (driverList != NULL) HeapFree(MSACM_hHeap, 0, driverList);
|
HeapFree(MSACM_hHeap, 0, driverList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -211,7 +211,6 @@ static HRESULT WINAPI Hlink_SetMonikerReference(IHlink *iface, DWORD grfHLSETF,
|
||||||
|
|
||||||
if(This->mon)
|
if(This->mon)
|
||||||
IMoniker_Release(This->mon);
|
IMoniker_Release(This->mon);
|
||||||
if(This->location)
|
|
||||||
HeapFree(GetProcessHeap(), 0, This->location);
|
HeapFree(GetProcessHeap(), 0, This->location);
|
||||||
|
|
||||||
if(pimkTarget)
|
if(pimkTarget)
|
||||||
|
|
|
@ -1437,13 +1437,9 @@ void VFWAPI ICSeqCompressFrameEnd(PCOMPVARS pc)
|
||||||
TRACE("(%p)\n", pc);
|
TRACE("(%p)\n", pc);
|
||||||
ret = ICSendMessage(pc->hic, ICM_COMPRESS_END, 0, 0);
|
ret = ICSendMessage(pc->hic, ICM_COMPRESS_END, 0, 0);
|
||||||
TRACE(" -- %lx", ret);
|
TRACE(" -- %lx", ret);
|
||||||
if (pc->lpbiIn)
|
|
||||||
HeapFree(GetProcessHeap(), 0, pc->lpbiIn);
|
HeapFree(GetProcessHeap(), 0, pc->lpbiIn);
|
||||||
if (pc->lpBitsPrev)
|
|
||||||
HeapFree(GetProcessHeap(), 0, pc->lpBitsPrev);
|
HeapFree(GetProcessHeap(), 0, pc->lpBitsPrev);
|
||||||
if (pc->lpBitsOut)
|
|
||||||
HeapFree(GetProcessHeap(), 0, pc->lpBitsOut);
|
HeapFree(GetProcessHeap(), 0, pc->lpBitsOut);
|
||||||
if (pc->lpState)
|
|
||||||
HeapFree(GetProcessHeap(), 0, pc->lpState);
|
HeapFree(GetProcessHeap(), 0, pc->lpState);
|
||||||
pc->lpbiIn = pc->lpBitsPrev = pc->lpBitsOut = pc->lpState = NULL;
|
pc->lpbiIn = pc->lpBitsPrev = pc->lpBitsOut = pc->lpState = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1336,9 +1336,7 @@ static void process_detach(void)
|
||||||
|
|
||||||
/* Do not leak memory... */
|
/* Do not leak memory... */
|
||||||
wgl_ext_finalize_extensions();
|
wgl_ext_finalize_extensions();
|
||||||
if (NULL != internal_gl_extensions) {
|
|
||||||
HeapFree(GetProcessHeap(), 0, internal_gl_extensions);
|
HeapFree(GetProcessHeap(), 0, internal_gl_extensions);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -1078,7 +1078,7 @@ HPBUFFERARB WINAPI wglCreatePbufferARB(HDC hdc, int iPixelFormat, int iWidth, in
|
||||||
|
|
||||||
create_failed:
|
create_failed:
|
||||||
if (NULL != cfgs) XFree(cfgs);
|
if (NULL != cfgs) XFree(cfgs);
|
||||||
if (NULL != object) HeapFree(GetProcessHeap(), 0, object);
|
HeapFree(GetProcessHeap(), 0, object);
|
||||||
TRACE("->(FAILED)\n");
|
TRACE("->(FAILED)\n");
|
||||||
return (HPBUFFERARB) NULL;
|
return (HPBUFFERARB) NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -782,7 +782,6 @@ ME_StreamOutText(ME_TextEditor *editor, ME_OutStream *pStream, int nStart, int n
|
||||||
nSize = WideCharToMultiByte(nCodePage, 0, item->member.run.strText->szData + nStart,
|
nSize = WideCharToMultiByte(nCodePage, 0, item->member.run.strText->szData + nStart,
|
||||||
nLen, NULL, 0, NULL, NULL);
|
nLen, NULL, 0, NULL, NULL);
|
||||||
if (nSize > nBufLen) {
|
if (nSize > nBufLen) {
|
||||||
if (buffer)
|
|
||||||
FREE_OBJ(buffer);
|
FREE_OBJ(buffer);
|
||||||
buffer = ALLOC_N_OBJ(char, nSize);
|
buffer = ALLOC_N_OBJ(char, nSize);
|
||||||
nBufLen = nSize;
|
nBufLen = nSize;
|
||||||
|
@ -800,7 +799,6 @@ ME_StreamOutText(ME_TextEditor *editor, ME_OutStream *pStream, int nStart, int n
|
||||||
item = ME_FindItemFwd(item, diRun);
|
item = ME_FindItemFwd(item, diRun);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buffer)
|
|
||||||
FREE_OBJ(buffer);
|
FREE_OBJ(buffer);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -666,7 +666,6 @@ static void SECUR32_freeProviders(void)
|
||||||
{
|
{
|
||||||
LIST_FOR_EACH_ENTRY(provider, &providerTable->table, SecureProvider, entry)
|
LIST_FOR_EACH_ENTRY(provider, &providerTable->table, SecureProvider, entry)
|
||||||
{
|
{
|
||||||
if (provider->moduleName)
|
|
||||||
SECUR32_FREE(provider->moduleName);
|
SECUR32_FREE(provider->moduleName);
|
||||||
if (provider->lib)
|
if (provider->lib)
|
||||||
FreeLibrary(provider->lib);
|
FreeLibrary(provider->lib);
|
||||||
|
@ -689,7 +688,7 @@ static void SECUR32_freeProviders(void)
|
||||||
*/
|
*/
|
||||||
SECURITY_STATUS WINAPI FreeContextBuffer(PVOID pv)
|
SECURITY_STATUS WINAPI FreeContextBuffer(PVOID pv)
|
||||||
{
|
{
|
||||||
if (pv) SECUR32_FREE(pv);
|
SECUR32_FREE(pv);
|
||||||
|
|
||||||
return SEC_E_OK;
|
return SEC_E_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,11 +162,8 @@ SECURITY_STATUS setupClient(PCredHandle cred, const char *user,
|
||||||
|
|
||||||
if( identity != NULL)
|
if( identity != NULL)
|
||||||
{
|
{
|
||||||
if(identity->Domain != 0)
|
|
||||||
HeapFree(GetProcessHeap(), 0, identity->Domain);
|
HeapFree(GetProcessHeap(), 0, identity->Domain);
|
||||||
if(identity->User != 0)
|
|
||||||
HeapFree(GetProcessHeap(), 0, identity->User);
|
HeapFree(GetProcessHeap(), 0, identity->User);
|
||||||
if(identity->Password != 0)
|
|
||||||
HeapFree(GetProcessHeap(), 0, identity->Password);
|
HeapFree(GetProcessHeap(), 0, identity->Password);
|
||||||
HeapFree(GetProcessHeap(), 0, identity);
|
HeapFree(GetProcessHeap(), 0, identity);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,9 +77,7 @@ SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleW(
|
||||||
ret = AcquireCredentialsHandleA(principal, package, fCredentialsUse,
|
ret = AcquireCredentialsHandleA(principal, package, fCredentialsUse,
|
||||||
pvLogonID, pAuthData, pGetKeyFn, pvGetKeyArgument, phCredential,
|
pvLogonID, pAuthData, pGetKeyFn, pvGetKeyArgument, phCredential,
|
||||||
ptsExpiry);
|
ptsExpiry);
|
||||||
if (principal)
|
|
||||||
SECUR32_FREE(principal);
|
SECUR32_FREE(principal);
|
||||||
if (package)
|
|
||||||
SECUR32_FREE(package);
|
SECUR32_FREE(package);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -262,7 +260,6 @@ SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextW(
|
||||||
phCredential, phContext, target, fContextReq, Reserved1,
|
phCredential, phContext, target, fContextReq, Reserved1,
|
||||||
TargetDataRep, pInput, Reserved2, phNewContext, pOutput,
|
TargetDataRep, pInput, Reserved2, phNewContext, pOutput,
|
||||||
pfContextAttr, ptsExpiry);
|
pfContextAttr, ptsExpiry);
|
||||||
if (target)
|
|
||||||
SECUR32_FREE(target);
|
SECUR32_FREE(target);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -898,7 +895,6 @@ SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextW(
|
||||||
TRACE("%s %p %p %p\n", debugstr_w(pszPackage), pPackedContext, Token,
|
TRACE("%s %p %p %p\n", debugstr_w(pszPackage), pPackedContext, Token,
|
||||||
phContext);
|
phContext);
|
||||||
ret = ImportSecurityContextA(package, pPackedContext, Token, phContext);
|
ret = ImportSecurityContextA(package, pPackedContext, Token, phContext);
|
||||||
if (package)
|
|
||||||
SECUR32_FREE(package);
|
SECUR32_FREE(package);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -737,9 +737,7 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
|
||||||
Binding_CloseCacheDownload(bind);
|
Binding_CloseCacheDownload(bind);
|
||||||
Binding_FinishedDownload(bind, hres);
|
Binding_FinishedDownload(bind, hres);
|
||||||
|
|
||||||
if (user)
|
|
||||||
HeapFree(GetProcessHeap(), 0, user);
|
HeapFree(GetProcessHeap(), 0, user);
|
||||||
if (pass)
|
|
||||||
HeapFree(GetProcessHeap(), 0, pass);
|
HeapFree(GetProcessHeap(), 0, pass);
|
||||||
HeapFree(GetProcessHeap(), 0, path);
|
HeapFree(GetProcessHeap(), 0, path);
|
||||||
HeapFree(GetProcessHeap(), 0, host);
|
HeapFree(GetProcessHeap(), 0, host);
|
||||||
|
|
|
@ -60,9 +60,7 @@ ULONG WINAPI IWineD3DQueryImpl_Release(IWineD3DQuery *iface) {
|
||||||
TRACE("(%p) : Releasing from %ld\n", This, This->ref);
|
TRACE("(%p) : Releasing from %ld\n", This, This->ref);
|
||||||
ref = InterlockedDecrement(&This->ref);
|
ref = InterlockedDecrement(&This->ref);
|
||||||
if (ref == 0) {
|
if (ref == 0) {
|
||||||
if(This->extendedData != NULL){
|
|
||||||
HeapFree(GetProcessHeap(), 0, This->extendedData);
|
HeapFree(GetProcessHeap(), 0, This->extendedData);
|
||||||
}
|
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
}
|
}
|
||||||
return ref;
|
return ref;
|
||||||
|
|
|
@ -1533,7 +1533,6 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR
|
||||||
debugstr_wn(lpUC->lpszUrlPath,lpUC->dwUrlPathLength),
|
debugstr_wn(lpUC->lpszUrlPath,lpUC->dwUrlPathLength),
|
||||||
debugstr_wn(lpUC->lpszExtraInfo,lpUC->dwExtraInfoLength));
|
debugstr_wn(lpUC->lpszExtraInfo,lpUC->dwExtraInfoLength));
|
||||||
|
|
||||||
if (lpszUrl_decode)
|
|
||||||
HeapFree(GetProcessHeap(), 0, lpszUrl_decode );
|
HeapFree(GetProcessHeap(), 0, lpszUrl_decode );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2280,7 +2280,6 @@ BOOL WINAPI CommitUrlCacheEntryA(
|
||||||
{
|
{
|
||||||
dwError = GetLastError();
|
dwError = GetLastError();
|
||||||
}
|
}
|
||||||
if (original_url)
|
|
||||||
HeapFree(GetProcessHeap(), 0, original_url);
|
HeapFree(GetProcessHeap(), 0, original_url);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1041,11 +1041,9 @@ static int ALSA_AddCommonDevice(snd_ctl_t *ctl, snd_pcm_t *pcm, const char *pcmn
|
||||||
*/
|
*/
|
||||||
static void ALSA_FreeDevice(WINE_WAVEDEV *ww)
|
static void ALSA_FreeDevice(WINE_WAVEDEV *ww)
|
||||||
{
|
{
|
||||||
if (ww->pcmname)
|
|
||||||
HeapFree(GetProcessHeap(), 0, ww->pcmname);
|
HeapFree(GetProcessHeap(), 0, ww->pcmname);
|
||||||
ww->pcmname = NULL;
|
ww->pcmname = NULL;
|
||||||
|
|
||||||
if (ww->ctlname)
|
|
||||||
HeapFree(GetProcessHeap(), 0, ww->ctlname);
|
HeapFree(GetProcessHeap(), 0, ww->ctlname);
|
||||||
ww->ctlname = NULL;
|
ww->ctlname = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1627,10 +1625,7 @@ LONG ALSA_WaveInit(void)
|
||||||
ALSA_AddUserSpecifiedDevice(ctl_name, pcm_name);
|
ALSA_AddUserSpecifiedDevice(ctl_name, pcm_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctl_name)
|
|
||||||
HeapFree(GetProcessHeap(), 0, ctl_name);
|
HeapFree(GetProcessHeap(), 0, ctl_name);
|
||||||
|
|
||||||
if (pcm_name)
|
|
||||||
HeapFree(GetProcessHeap(), 0, pcm_name);
|
HeapFree(GetProcessHeap(), 0, pcm_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -389,12 +389,8 @@ void ESD_CloseWaveOutDevice(WINE_WAVEOUT* wwo)
|
||||||
wwo->esd_fd = -1;
|
wwo->esd_fd = -1;
|
||||||
|
|
||||||
/* free up the buffer we use for volume and reset the size */
|
/* free up the buffer we use for volume and reset the size */
|
||||||
if(wwo->sound_buffer)
|
|
||||||
{
|
|
||||||
HeapFree(GetProcessHeap(), 0, wwo->sound_buffer);
|
HeapFree(GetProcessHeap(), 0, wwo->sound_buffer);
|
||||||
wwo->sound_buffer = NULL;
|
wwo->sound_buffer = NULL;
|
||||||
}
|
|
||||||
|
|
||||||
wwo->buffer_size = 0;
|
wwo->buffer_size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -344,7 +344,6 @@ static void FreeEntry(int entry)
|
||||||
formatEntry->realized = NULL;
|
formatEntry->realized = NULL;
|
||||||
if(formatEntry->bitmaps) {
|
if(formatEntry->bitmaps) {
|
||||||
for(i = 0; i < formatEntry->nrealized; i++)
|
for(i = 0; i < formatEntry->nrealized; i++)
|
||||||
if(formatEntry->bitmaps[i])
|
|
||||||
HeapFree(GetProcessHeap(), 0, formatEntry->bitmaps[i]);
|
HeapFree(GetProcessHeap(), 0, formatEntry->bitmaps[i]);
|
||||||
HeapFree(GetProcessHeap(), 0, formatEntry->bitmaps);
|
HeapFree(GetProcessHeap(), 0, formatEntry->bitmaps);
|
||||||
formatEntry->bitmaps = NULL;
|
formatEntry->bitmaps = NULL;
|
||||||
|
|
|
@ -628,7 +628,6 @@ done:
|
||||||
SendMessage(hwndTV, WM_SETREDRAW, TRUE, 0);
|
SendMessage(hwndTV, WM_SETREDRAW, TRUE, 0);
|
||||||
SetCursor(hcursorOld);
|
SetCursor(hcursorOld);
|
||||||
expanding = FALSE;
|
expanding = FALSE;
|
||||||
if (keyPath)
|
|
||||||
HeapFree(GetProcessHeap(), 0, keyPath);
|
HeapFree(GetProcessHeap(), 0, keyPath);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -326,7 +326,6 @@ static BOOL pendingRename(void)
|
||||||
res=TRUE;
|
res=TRUE;
|
||||||
|
|
||||||
end:
|
end:
|
||||||
if( buffer!=NULL )
|
|
||||||
HeapFree(GetProcessHeap(), 0, buffer);
|
HeapFree(GetProcessHeap(), 0, buffer);
|
||||||
|
|
||||||
if( hSession!=NULL )
|
if( hSession!=NULL )
|
||||||
|
|
|
@ -480,11 +480,8 @@ static void findAudioDrivers(void)
|
||||||
HCURSOR old_cursor;
|
HCURSOR old_cursor;
|
||||||
|
|
||||||
/* delete an existing list */
|
/* delete an existing list */
|
||||||
if (loadedAudioDrv)
|
|
||||||
{
|
|
||||||
HeapFree(GetProcessHeap(), 0, loadedAudioDrv);
|
HeapFree(GetProcessHeap(), 0, loadedAudioDrv);
|
||||||
loadedAudioDrv = 0;
|
loadedAudioDrv = 0;
|
||||||
}
|
|
||||||
|
|
||||||
/* change to the wait cursor because this can take a while if there is a
|
/* change to the wait cursor because this can take a while if there is a
|
||||||
* misbehaving driver that takes a long time to open
|
* misbehaving driver that takes a long time to open
|
||||||
|
|
Loading…
Add table
Reference in a new issue