Lionel Debroux : winedevice: Fix memory leak (found by Smatch).

Alexandre Julliard julliard at winehq.org
Mon Dec 17 06:42:20 CST 2007


Module: wine
Branch: master
Commit: 6ac689368a7d10d89547d9554648a6d229c99ee8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6ac689368a7d10d89547d9554648a6d229c99ee8

Author: Lionel Debroux <lionel_debroux at yahoo.fr>
Date:   Fri Dec 14 14:57:17 2007 +0100

winedevice: Fix memory leak (found by Smatch).

---

 programs/winedevice/device.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/programs/winedevice/device.c b/programs/winedevice/device.c
index 9af85f4..f40d5d8 100644
--- a/programs/winedevice/device.c
+++ b/programs/winedevice/device.c
@@ -118,6 +118,7 @@ static BOOL load_driver(void)
     if (RegOpenKeyW( HKEY_LOCAL_MACHINE, str + 18 /* skip \registry\machine */, &driver_hkey ))
     {
         WINE_ERR( "cannot open key %s, err=%u\n", wine_dbgstr_w(str), GetLastError() );
+        HeapFree( GetProcessHeap(), 0, str);
         return FALSE;
     }
     RtlInitUnicodeString( &keypath, str );




More information about the wine-cvs mailing list