mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
fix a possible memory leak
svn path=/trunk/; revision=32487
This commit is contained in:
parent
17a4f40fbe
commit
1a43baa3d1
1 changed files with 2 additions and 1 deletions
|
@ -1740,7 +1740,8 @@ PnpEventThread(LPVOID lpParameter)
|
|||
if (Status == STATUS_BUFFER_TOO_SMALL)
|
||||
{
|
||||
PnpEventSize += 0x400;
|
||||
PnpEvent = HeapReAlloc(GetProcessHeap(), 0, PnpEvent, PnpEventSize);
|
||||
HeapFree(GetProcessHeap(), 0, PnpEvent);
|
||||
PnpEvent = HeapAlloc(GetProcessHeap(), 0, PnpEventSize);
|
||||
if (PnpEvent == NULL)
|
||||
return ERROR_OUTOFMEMORY;
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue