Merge pull request #4203 from floppym/mkdir-error

winpr: _IoCreateDeviceEx: fix mkdir error check
This commit is contained in:
Mike Gilbert 2017-10-30 12:29:58 -04:00 committed by GitHub
commit 5b34c033a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ NTSTATUS _IoCreateDeviceEx(PDRIVER_OBJECT_EX DriverObject, ULONG DeviceExtension
if (!PathFileExistsA(DeviceBasePath)) if (!PathFileExistsA(DeviceBasePath))
{ {
if (!mkdir(DeviceBasePath, S_IRUSR | S_IWUSR | S_IXUSR)) if (mkdir(DeviceBasePath, S_IRUSR | S_IWUSR | S_IXUSR) != 0)
{ {
free(DeviceBasePath); free(DeviceBasePath);
return STATUS_ACCESS_DENIED; return STATUS_ACCESS_DENIED;