Author: akhaldi Date: Wed Dec 16 22:39:01 2015 New Revision: 70372
URL: http://svn.reactos.org/svn/reactos?rev=70372&view=rev Log: [0.4.0] * Merge the IopGetDeviceInterfaceList() null pointer freeing fix by Thomas Faber in r70356. CORE-10706
Modified: branches/ros-branch-0_4_0/ (props changed) branches/ros-branch-0_4_0/reactos/ (props changed) branches/ros-branch-0_4_0/reactos/ntoskrnl/io/pnpmgr/plugplay.c
Propchange: branches/ros-branch-0_4_0/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Dec 16 22:39:01 2015 @@ -1 +1 @@ -/trunk:70000-70321,70323-70324,70328-70337,70347,70349,70354-70355,70357-70358,70360,70363,70369 +/trunk:70000-70321,70323-70324,70328-70337,70347,70349,70354-70358,70360,70363,70369
Propchange: branches/ros-branch-0_4_0/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Dec 16 22:39:01 2015 @@ -20,4 +20,4 @@ /branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859 /branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567 /branches/wlan-bringup:54809-54998 -/trunk/reactos:70000-70321,70323-70324,70328-70337,70347,70349,70354-70355,70357-70358,70360,70363,70369 +/trunk/reactos:70000-70321,70323-70324,70328-70337,70347,70349,70354-70358,70360,70363,70369
Modified: branches/ros-branch-0_4_0/reactos/ntoskrnl/io/pnpmgr/plugplay.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/ntoskrn... ============================================================================== --- branches/ros-branch-0_4_0/reactos/ntoskrnl/io/pnpmgr/plugplay.c [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/ntoskrnl/io/pnpmgr/plugplay.c [iso-8859-1] Wed Dec 16 22:39:01 2015 @@ -247,7 +247,10 @@ { /* Get the device object */ DeviceObject = IopGetDeviceObjectFromDeviceInstance(&DeviceInstance); - ExFreePool(DeviceInstance.Buffer); + if (DeviceInstance.Buffer != NULL) + { + ExFreePool(DeviceInstance.Buffer); + } }
Status = IoGetDeviceInterfaces(&FilterGuid, DeviceObject, StackList.Flags, &SymbolicLinkList); @@ -317,14 +320,20 @@ } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - ExFreePool(DeviceInstance.Buffer); + if (DeviceInstance.Buffer != NULL) + { + ExFreePool(DeviceInstance.Buffer); + } _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END;
/* Get the device object */ DeviceObject = IopGetDeviceObjectFromDeviceInstance(&DeviceInstance); - ExFreePool(DeviceInstance.Buffer); + if (DeviceInstance.Buffer != NULL) + { + ExFreePool(DeviceInstance.Buffer); + } if (DeviceObject == NULL) { return STATUS_NO_SUCH_DEVICE; @@ -394,7 +403,10 @@ } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - ExFreePool(TargetDeviceInstance.Buffer); + if (TargetDeviceInstance.Buffer != NULL) + { + ExFreePool(TargetDeviceInstance.Buffer); + } _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END; @@ -406,13 +418,19 @@ TRUE)) { DeviceNode = IopRootDeviceNode; - ExFreePool(TargetDeviceInstance.Buffer); + if (TargetDeviceInstance.Buffer != NULL) + { + ExFreePool(TargetDeviceInstance.Buffer); + } } else { /* Get the device object */ DeviceObject = IopGetDeviceObjectFromDeviceInstance(&TargetDeviceInstance); - ExFreePool(TargetDeviceInstance.Buffer); + if (TargetDeviceInstance.Buffer != NULL) + { + ExFreePool(TargetDeviceInstance.Buffer); + } if (DeviceObject == NULL) return STATUS_NO_SUCH_DEVICE;
@@ -566,14 +584,20 @@ } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - ExFreePool(DeviceInstance.Buffer); + if (DeviceInstance.Buffer != NULL) + { + ExFreePool(DeviceInstance.Buffer); + } _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END;
/* Get the device object */ DeviceObject = IopGetDeviceObjectFromDeviceInstance(&DeviceInstance); - ExFreePool(DeviceInstance.Buffer); + if (DeviceInstance.Buffer != NULL) + { + ExFreePool(DeviceInstance.Buffer); + } if (DeviceObject == NULL) { return STATUS_NO_SUCH_DEVICE; @@ -647,7 +671,10 @@
/* Get the device object */ DeviceObject = IopGetDeviceObjectFromDeviceInstance(&DeviceInstance); - ExFreePool(DeviceInstance.Buffer); + if (DeviceInstance.Buffer != NULL) + { + ExFreePool(DeviceInstance.Buffer); + } if (DeviceObject == NULL) { return STATUS_NO_SUCH_DEVICE; @@ -689,7 +716,10 @@
/* Get the device object */ DeviceObject = IopGetDeviceObjectFromDeviceInstance(&DeviceInstance); - ExFreePool(DeviceInstance.Buffer); + if (DeviceInstance.Buffer != NULL) + { + ExFreePool(DeviceInstance.Buffer); + } if (DeviceObject == NULL) { return STATUS_NO_SUCH_DEVICE;