diff --git a/reactos/dll/win32/msports/classinst.c b/reactos/dll/win32/msports/classinst.c index 78d0995e3b8..b026581bcfc 100644 --- a/reactos/dll/win32/msports/classinst.c +++ b/reactos/dll/win32/msports/classinst.c @@ -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);