[ros-dev] RE: [ros-diffs] [cwittich] 19266: fix memory leak in case of erro r

Murphy, Ged (Bolton) MurphyG at cmpbatteries.co.uk
Wed Nov 16 16:56:51 CET 2005


There is another here : 
 
    HardwareIdW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
    if (!HardwareIdW)
    {
        SetLastError(ERROR_GEN_FAILURE);
        return FALSE;
    }


-----Original Message-----
From: cwittich at svn.reactos.com [mailto:cwittich at svn.reactos.com] 
Sent: 16 November 2005 15:54
To: ros-diffs at 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 at exideuk.co.uk 
<mailto:postmaster at 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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-dev/attachments/20051116/f24eeddb/attachment.html


More information about the Ros-dev mailing list