Author: pschweitzer
Date: Sat Oct 24 10:14:21 2015
New Revision: 69672
URL:
http://svn.reactos.org/svn/reactos?rev=69672&view=rev
Log:
[SETUPAPI]
Partly backport Wine commit: 4d796458d0ed517d45adc57a1aedaf1c3bdde232
"Avoid memory leaks (coverity)." by André Hentschel
CID 716469
Modified:
trunk/reactos/dll/win32/setupapi/queue.c
Modified: trunk/reactos/dll/win32/setupapi/queue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/queue.c…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/queue.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/queue.c [iso-8859-1] Sat Oct 24 10:14:21 2015
@@ -1216,7 +1216,11 @@
SetLastError( ERROR_NOT_ENOUGH_MEMORY );
return FALSE;
}
- if (!SetupGetStringFieldW( inf_context, 1, inf_source, len, NULL )) return
FALSE;
+ if (!SetupGetStringFieldW( inf_context, 1, inf_source, len, NULL ))
+ {
+ HeapFree( GetProcessHeap(), 0, inf_source );
+ return FALSE;
+ }
source = inf_source;
}
else if (!source)