avifil32: Use HeapAlloc/Free instead of LocalAlloc/Free.

This commit is contained in:
Mike McCormack 2006-03-11 14:41:16 +09:00 committed by Alexandre Julliard
parent 8ed1ca3e4b
commit a4b816c752

View File

@ -26,7 +26,6 @@
#include "winuser.h"
#include "winnls.h"
#include "winerror.h"
#include "windowsx.h"
#include "mmsystem.h"
#include "vfw.h"
@ -77,7 +76,7 @@ PAVIFILE AVIFILE_CreateAVITempFile(int nStreams, PAVISTREAM *ppStreams) {
ITmpFileImpl *tmpFile;
int i;
tmpFile = LocalAlloc(LPTR, sizeof(ITmpFileImpl));
tmpFile = HeapAlloc(GetProcessHeap(), 0, sizeof(ITmpFileImpl));
if (tmpFile == NULL)
return NULL;
@ -86,9 +85,9 @@ PAVIFILE AVIFILE_CreateAVITempFile(int nStreams, PAVISTREAM *ppStreams) {
memset(&tmpFile->fInfo, 0, sizeof(tmpFile->fInfo));
tmpFile->fInfo.dwStreams = nStreams;
tmpFile->ppStreams = LocalAlloc(LPTR, nStreams * sizeof(PAVISTREAM));
tmpFile->ppStreams = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(PAVISTREAM));
if (tmpFile->ppStreams == NULL) {
LocalFree((HLOCAL)tmpFile);
HeapFree(GetProcessHeap(), 0, tmpFile);
return NULL;
}
@ -177,7 +176,7 @@ static ULONG WINAPI ITmpFile_fnRelease(IAVIFile *iface)
}
}
LocalFree((HLOCAL)This);
HeapFree(GetProcessHeap(), 0, This);
return 0;
}