[ros-diffs] [cwittich] 32487: fix a possible memory leak
cwittich at svn.reactos.org
cwittich at svn.reactos.org
Tue Feb 26 13:53:01 CET 2008
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/umpnpmgr.c?rev=32487&r1=32486&r2=32487&view=diff
==============================================================================
--- 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;
More information about the Ros-diffs
mailing list