Author: cwittich
Date: Tue Feb 26 15:52:59 2008
New Revision: 32487
URL:
http://svn.reactos.org/svn/reactos?rev=32487&view=rev
Log:
fix a possible memory leak
Modified:
trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/umpnpmgr/ump…
==============================================================================
--- trunk/reactos/base/services/umpnpmgr/umpnpmgr.c (original)
+++ trunk/reactos/base/services/umpnpmgr/umpnpmgr.c Tue Feb 26 15:52:59 2008
@@ -1740,7 +1740,8 @@
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;