Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8ed1ca3e
Commit
8ed1ca3e
authored
Mar 11, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Mar 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avifil32: Use HeapAlloc instead of LocalAlloc. Make sure to free the memory.
parent
04dad621
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
factory.c
dlls/avifil32/factory.c
+4
-2
No files found.
dlls/avifil32/factory.c
View file @
8ed1ca3e
...
@@ -75,7 +75,7 @@ static HRESULT AVIFILE_CreateClassFactory(const CLSID *pclsid, const IID *riid,
...
@@ -75,7 +75,7 @@ static HRESULT AVIFILE_CreateClassFactory(const CLSID *pclsid, const IID *riid,
*
ppv
=
NULL
;
*
ppv
=
NULL
;
pClassFactory
=
(
IClassFactoryImpl
*
)
LocalAlloc
(
LPTR
,
sizeof
(
*
pClassFactory
));
pClassFactory
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
pClassFactory
));
if
(
pClassFactory
==
NULL
)
if
(
pClassFactory
==
NULL
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
@@ -85,7 +85,7 @@ static HRESULT AVIFILE_CreateClassFactory(const CLSID *pclsid, const IID *riid,
...
@@ -85,7 +85,7 @@ static HRESULT AVIFILE_CreateClassFactory(const CLSID *pclsid, const IID *riid,
hr
=
IClassFactory_QueryInterface
((
IClassFactory
*
)
pClassFactory
,
riid
,
ppv
);
hr
=
IClassFactory_QueryInterface
((
IClassFactory
*
)
pClassFactory
,
riid
,
ppv
);
if
(
FAILED
(
hr
))
{
if
(
FAILED
(
hr
))
{
LocalFree
((
HLOCAL
)
pClassFactory
);
HeapFree
(
GetProcessHeap
(),
0
,
pClassFactory
);
*
ppv
=
NULL
;
*
ppv
=
NULL
;
}
}
...
@@ -124,6 +124,8 @@ static ULONG WINAPI IClassFactory_fnRelease(LPCLASSFACTORY iface)
...
@@ -124,6 +124,8 @@ static ULONG WINAPI IClassFactory_fnRelease(LPCLASSFACTORY iface)
if
((
--
(
This
->
dwRef
))
>
0
)
if
((
--
(
This
->
dwRef
))
>
0
)
return
This
->
dwRef
;
return
This
->
dwRef
;
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment