sorry ignore, I didn't read the full function.
-----Original Message-----
From: Murphy, Ged (Bolton) [mailto:MurphyG@cmpbatteries.co.uk]
Sent: 16 November 2005 15:57
To: 'ros-dev(a)reactos.org'
Subject: [ros-dev] RE: [ros-diffs] [cwittich] 19266: fix memory leak in case
of erro r
There is another here :
HardwareIdW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!HardwareIdW)
{
SetLastError(ERROR_GEN_FAILURE);
return FALSE;
}
-----Original Message-----
From: cwittich(a)svn.reactos.com [mailto:cwittich@svn.reactos.com]
Sent: 16 November 2005 15:54
To: ros-diffs(a)reactos.com
Subject: [ros-diffs] [cwittich] 19266: fix memory leak in case of error
fix memory leak in case of error
Modified: trunk/reactos/lib/newdev/newdev.c
_____
Modified: trunk/reactos/lib/newdev/newdev.c
--- trunk/reactos/lib/newdev/newdev.c 2005-11-16 15:14:31 UTC (rev 19265)
+++ trunk/reactos/lib/newdev/newdev.c 2005-11-16 15:53:16 UTC (rev 19266)
@@ -66,6 +66,7 @@
FullInfPathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!FullInfPathW)
{
+ HeapFree(GetProcessHeap(), 0, HardwareIdW);
SetLastError(ERROR_GEN_FAILURE);
return FALSE;
}
************************************************************************
The information contained in this message or any of its
attachments is confidential and is intended for the exclusive
use of the addressee. The information may also be legally
privileged. The views expressed may not be company policy,
but the personal views of the originator. If you are not the
addressee, any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited.
If you have received this message in error, please contact
postmaster(a)exideuk.co.uk
and then delete this message.
Exide Technologies is an industrial and transportation battery
producer and recycler with operations in 89 countries.
Further information can be found at
www.exide.com
************************************************************************
The information contained in this message or any of its
attachments is confidential and is intended for the exclusive
use of the addressee. The information may also be legally
privileged. The views expressed may not be company policy,
but the personal views of the originator. If you are not the
addressee, any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited.
If you have received this message in error, please contact
postmaster(a)exideuk.co.uk
<mailto:postmaster@exideuk.co.uk> and then delete this message.
Exide Technologies is an industrial and transportation battery
producer and recycler with operations in 89 countries.
Further information can be found at
www.exide.com