[MSPORTS]
authorKamil Hornicek <kamil.hornicek@reactos.org>
Wed, 1 Feb 2017 18:36:40 +0000 (18:36 +0000)
committerKamil Hornicek <kamil.hornicek@reactos.org>
Wed, 1 Feb 2017 18:36:40 +0000 (18:36 +0000)
- Check for failure when calling SetupDiGetActualSectionToInstallW so we don't pass garbage to SetupInstallFromInfSectionW. CID 715920

svn path=/trunk/; revision=73663

reactos/dll/win32/msports/classinst.c

index 78d0995..b026581 100644 (file)
@@ -579,12 +579,13 @@ InstallDeviceData(IN HDEVINFO DeviceInfoSet,
 
     TRACE("Section name: %S\n", DriverInfoDetailData->SectionName);
 
-    SetupDiGetActualSectionToInstallW(hInf,
-                                      DriverInfoDetailData->SectionName,
-                                      InfSectionWithExt,
-                                      256,
-                                      NULL,
-                                      NULL);
+    if (!SetupDiGetActualSectionToInstallW(hInf,
+                                           DriverInfoDetailData->SectionName,
+                                           InfSectionWithExt,
+                                           256,
+                                           NULL,
+                                           NULL))
+        goto done;
 
     TRACE("InfSectionWithExt: %S\n", InfSectionWithExt);