mirror of
https://github.com/reactos/reactos.git
synced 2024-10-18 23:18:56 +00:00
- Fix a bug which was responsible for most audio-related crashes
- Found by DosX (Gregor Schneider) - Fix memory leak See issue #4674 for more details. svn path=/trunk/; revision=41835
This commit is contained in:
parent
2d834b1bdd
commit
d50238833b
|
@ -19,7 +19,7 @@ KspCreateObjectType(
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
UNICODE_STRING Name;
|
UNICODE_STRING Name;
|
||||||
|
|
||||||
Name.Length = (wcslen(ObjectType) + 1) * sizeof(WCHAR) + CreateParametersSize;
|
Name.Length = Name.MaximumLength = (wcslen(ObjectType) + 1) * sizeof(WCHAR) + CreateParametersSize;
|
||||||
Name.MaximumLength += sizeof(WCHAR);
|
Name.MaximumLength += sizeof(WCHAR);
|
||||||
Name.Buffer = ExAllocatePool(NonPagedPool, Name.MaximumLength);
|
Name.Buffer = ExAllocatePool(NonPagedPool, Name.MaximumLength);
|
||||||
|
|
||||||
|
@ -52,8 +52,7 @@ KspCreateObjectType(
|
||||||
NULL,
|
NULL,
|
||||||
IO_NO_PARAMETER_CHECKING | IO_FORCE_ACCESS_CHECK);
|
IO_NO_PARAMETER_CHECKING | IO_FORCE_ACCESS_CHECK);
|
||||||
|
|
||||||
// HACK HACK HACK HACK
|
ExFreePool(Name.Buffer);
|
||||||
//ExFreePool(Name.Buffer);
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ KspCreateObjectType(
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
UNICODE_STRING Name;
|
UNICODE_STRING Name;
|
||||||
|
|
||||||
Name.Length = (wcslen(ObjectType) + 1) * sizeof(WCHAR) + CreateParametersSize;
|
Name.Length = Name.MaximumLength = (wcslen(ObjectType) + 1) * sizeof(WCHAR) + CreateParametersSize;
|
||||||
Name.MaximumLength += sizeof(WCHAR);
|
Name.MaximumLength += sizeof(WCHAR);
|
||||||
Name.Buffer = ExAllocatePool(NonPagedPool, Name.MaximumLength);
|
Name.Buffer = ExAllocatePool(NonPagedPool, Name.MaximumLength);
|
||||||
|
|
||||||
|
@ -75,6 +75,8 @@ KspCreateObjectType(
|
||||||
NULL,
|
NULL,
|
||||||
IO_NO_PARAMETER_CHECKING | IO_FORCE_ACCESS_CHECK);
|
IO_NO_PARAMETER_CHECKING | IO_FORCE_ACCESS_CHECK);
|
||||||
|
|
||||||
|
ExFreePool(Name.Buffer);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -984,6 +986,7 @@ SysAudioHandleProperty(
|
||||||
|
|
||||||
RtlStringFromGUID(&Property->Set, &GuidString);
|
RtlStringFromGUID(&Property->Set, &GuidString);
|
||||||
DPRINT1("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
|
DPRINT1("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
|
||||||
|
DbgBreakPoint();
|
||||||
RtlFreeUnicodeString(&GuidString);
|
RtlFreeUnicodeString(&GuidString);
|
||||||
return SetIrpIoStatus(Irp, STATUS_UNSUCCESSFUL, 0);
|
return SetIrpIoStatus(Irp, STATUS_UNSUCCESSFUL, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue