[SETUPAPI]
authorPierre Schweitzer <pierre@reactos.org>
Sat, 24 Oct 2015 10:14:21 +0000 (10:14 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 24 Oct 2015 10:14:21 +0000 (10:14 +0000)
Partly backport Wine commit: 4d796458d0ed517d45adc57a1aedaf1c3bdde232
"Avoid memory leaks (coverity)." by AndrĂ© Hentschel

CID 716469

svn path=/trunk/; revision=69672

reactos/dll/win32/setupapi/queue.c

index d10f1e0..6848868 100644 (file)
@@ -1216,7 +1216,11 @@ BOOL WINAPI SetupInstallFileW( HINF hinf, PINFCONTEXT inf_context, PCWSTR source
             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)